Testing to see if my data is uniform

  • Context: Undergrad 
  • Thread starter Thread starter Nyasha
  • Start date Start date
  • Tags Tags
    Data Testing Uniform
Click For Summary
SUMMARY

This discussion focuses on testing the uniformity of a dataset consisting of 16 data points using R. The user initially attempted to utilize the punif function but expressed uncertainty regarding the results. The consensus is that Bayesian analysis provides the most accurate method for assessing uniform distribution, as it allows for the incorporation of prior beliefs and data revision. Additionally, a goodness of fit test is recommended as a preliminary approach to evaluate the similarity between observed and expected distributions.

PREREQUISITES
  • Understanding of Bayesian analysis principles
  • Familiarity with R programming and the punif function
  • Knowledge of goodness of fit tests in statistics
  • Basic concepts of uniform distribution
NEXT STEPS
  • Explore Bayesian analysis techniques for distribution testing
  • Learn how to implement goodness of fit tests in R
  • Investigate alternative distribution models to compare against uniformity
  • Review statistical confidence levels and hypothesis testing
USEFUL FOR

Data analysts, statisticians, and researchers interested in validating distribution assumptions and improving data analysis methodologies.

Nyasha
Messages
127
Reaction score
0
So l have got 16 data points and l would like to know if this data follows a uniform distribution. I have tried using the punif function in R, but l am not sure about the results l am getting. Can someone please tell me what is the best way and hopefully easiest way to see if data is uniformly distributed
 
Physics news on Phys.org
It is never possible to say that a given set of data does or does not obey a certain distribution. You can estimate the likelihood of seeing the data you have if you assume that it is uniform, and you can make an estimate of the range of that distribution. But that doesn't tell you how likely it is to be uniform.
The only correct way is through Bayesian analysis. You have to plug in a priori beliefs of what the distribution might be, and how likely each possibility is. Then you can use the data to revise these estimates. The more data, the closer the revision gets to the "truth".
Failing that, I suggest you think up the most likely alternative to uniform (knowing what the data means) and show that the observations fit a uniform distribution better than they fit the alternative.
 
Nyasha said:
So l have got 16 data points and l would like to know if this data follows a uniform distribution. I have tried using the punif function in R, but l am not sure about the results l am getting. Can someone please tell me what is the best way and hopefully easiest way to see if data is uniformly distributed

Hey Nyasha.

One way to perform such a test is through a goodness of fit test.

The way this works intuitively is basically that it compares how 'close' each value of your expected distribution is from your observed and then based on that variation, checks whether under some confidence level using frequentist statistics if you can either reject or fail to reject the hypothesis under that test statistic, whether the observed distribution is the expected distribution.

The Bayesian analysis is a lot more general than this, but as a starting point, you could do this test to get an idea of the similarity and how big a confidence level is needed to fail to reject the hypothesis.

You are using R, so take a look at this:

http://ww2.coastal.edu/kingw/statistics/R-tutorials/goodness.html
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
900
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K