Chi Squared for Discrete Uniform
How do I do a chi-squared test with a discrete uniform distribution?
- A chi-squared () goodness of fit test can be used to test data from a sample which suggests that the population has a discrete uniform distribution
- For a random variable with the discrete uniform distribution
- can take a finite number of distinct values
- each value is equally likely
- There will never be any parameters to estimate for a discrete uniform goodness of fit test
What are the steps?
- STEP 1: Write the hypotheses
- : A discrete uniform distribution is a suitable model for Variable X
- : A discrete uniform distribution is not a suitable model for Variable X
- The hypotheses should always be stated in the context of the question
- Make sure you clearly write what the variable is and don’t just call it 'Variable X'
- STEP 2: Calculate the expected frequencies
- each expected frequency is the same
- divide the total frequency by the number of possible outcomes
- STEP 3: Calculate the degrees of freedom for the test
- For k possible outcomes
- degrees of freedom is
- STEP 4: Calculate using either version of the formula
-
- Determine the appropriate critical value
- is the critical value with degrees of freedom for significance level
- use the 'Percentage Points of the Distribution' table in the exam formula booklet
- Or, alternatively, use a calculator to find the p-value
- This is the probability of obtaining a chi-squared value of or more
- Determine the appropriate critical value
- STEP 5: Decide whether there is evidence to reject the null hypothesis
- Compare the statistic with the critical value you have determined
- If > critical value (or ) then there is sufficient evidence to reject
- If < critical value (or ) then there is insufficient evidence to reject
- Compare the statistic with the critical value you have determined
- STEP 6: Write your conclusion
- If you reject H0
- A discrete uniform distribution is not a suitable model
- If you do not reject H0
- A discrete uniform distribution is a suitable model
- Be sure to state your conclusion in the context of the question
- If you reject H0
Worked example
A car salesperson is interested in how her sales are distributed and records her sales results over a period of six weeks. The data is shown in the table.
Week |
1 |
2 |
3 |
4 |
5 |
6 |
Number of sales |
15 |
17 |
11 |
21 |
14 |
12 |
Test, at the 5% significance level, whether or not the observed frequencies could be modelled by a discrete uniform distribution.