---
title: "Chi-square uniformity test, 40 numbers"
subject: "Simulation and Modeling"
chapter: 6
key: "semester_8/simulation_and_modeling:chi-square-uniformity-table-2074"
source: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/chi-square-uniformity-table-2074
site: BCT Engineering
---

# Chi-square uniformity test, 40 numbers

Simulation and Modeling · Chapter 6: Random Number

- Asked in: 2074 Bhadra, 6 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/chi-square-uniformity-table-2074
- Whole chapter: https://www.bctengineer.com/md/semester_8/simulation_and_modeling/chapter-6

## Question

Using Chi-Square test the uniformity at 90% for the given random numbers. Degree of freedom for 6 = 10.645, 7 = 12.017, 8 = 13.362, 9 = 14.684, 10 = 15.987.

|  |  |  |  |  |  |  |  |  |  |
|---|---|---|---|---|---|---|---|---|---|
| 20 | 34 | 43 | 42 | 14 | 10 | 33 | 17 | 6 | 11 |
| 15 | 16 | 4 | 1 | 35 | 22 | 9 | 46 | 37 | 57 |
| 51 | 49 | 40 | 27 | 59 | 5 | 44 | 19 | 41 | 55 |
| 53 | 29 | 3 | 31 | 48 | 8 | 56 | 28 | 12 | 7 |

## Short answer

Divide the range 1‑59 into 10 equal classes, expected count Ei=4. Observed frequencies yield χ² = Σ (Oi−Ei)²/Ei = 2.00. With df=9 and α=0.10, critical value χ²0.10,9 = 14.684. Since 2.00 < 14.684, H0 is not rejected; the numbers can be accepted as uniform.

## Answer

**Setup.** H0: the numbers are uniformly distributed. H1: they are not. The 40 numbers lie between 1 and 59, so the range 1–60 is divided into 10 equal classes of width 6. The number of classes is n = 10, N = 40, so the expected frequency of each class is Ei = N/n = 40/10 = 4.

The test statistic is χ0² = Σ (Oi − Ei)²/Ei.

**Counting the observed frequencies**

| Class | Oi | Ei | Oi − Ei | (Oi − Ei)²/Ei |
|---|---|---|---|---|
| 1–6 | 5 | 4 | 1.0 | 0.250 |
| 7–12 | 6 | 4 | 2.0 | 1.000 |
| 13–18 | 4 | 4 | 0.0 | 0.000 |
| 19–24 | 3 | 4 | -1.0 | 0.250 |
| 25–30 | 3 | 4 | -1.0 | 0.250 |
| 31–36 | 4 | 4 | 0.0 | 0.000 |
| 37–42 | 4 | 4 | 0.0 | 0.000 |
| 43–48 | 4 | 4 | 0.0 | 0.000 |
| 49–54 | 3 | 4 | -1.0 | 0.250 |
| 55–60 | 4 | 4 | 0.0 | 0.000 |

Σ Oi = 40 (all 40 numbers counted).

**χ0² = 2.00**

**Critical value.** Confidence 90% means α = 0.10. Degrees of freedom = n − 1 = 10 − 1 = 9. From the values given, χ²0.10,9 = 14.684.

**Conclusion.** Since χ0² = 2.0 < 14.684, H0 is not rejected. At the 90% level the numbers can be accepted as uniformly distributed.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. With N = 40 numbers and 10 equal classes, what is Ei?
   A. 10
   B. 4
   C. 40
   D. 0.1
   Answer: B. Ei = N/n = 40/10 = 4. (Key point: Expected frequency)

2. What degrees of freedom are used for n = 10 classes?
   A. 10
   B. 8
   C. 11
   D. 9
   Answer: D. df = n - 1 = 9, so the critical value is 14.684 as given. (Key point: Degrees of freedom)

3. Which statistic is computed?
   A. sum (Oi - Ei)^2 / Ei
   B. max |Oi - Ei|
   C. sum (Oi - Ei) / Ei
   D. sum Oi^2
   Answer: A. chi-square0 = sum (Oi - Ei)^2 / Ei. (Key point: Test statistic)

4. With chi-square0 = 2.0 and critical 14.684, what is concluded?
   A. Reject H0, not uniform
   B. Do not reject H0; accept uniformity
   C. The test needs more classes
   D. Numbers are dependent
   Answer: B. Since 2.0 < 14.684, H0 is not rejected and uniformity is accepted at the 90% level. (Key point: Conclusion)

## Related in Simulation and Modeling

- [Chi-square test on 100 random numbers](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Achi-square-uniformity-100-numbers) — Simulation and Modeling, chapter 6
- [Poker test, 10,000 five-digit numbers (2072)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2072-ashwin) — Simulation and Modeling, chapter 6, asked 4×
- [Poker test, 10,000 five-digit numbers (2074)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2074-magh) — Simulation and Modeling, chapter 6, asked 2×

## Related in other subjects

- [K-map Σm(7,9,12,13,14,15)+d, NOR-only](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-nor-sum-7-9-12) — Digital Logic, chapter 3
- [Chi-square test of independence: 2×2 procedure](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Achi-square-independence-2x2-procedure) — Probability and Statistics, chapter 7
- [Minterms/maxterms; K-map Σm(0,1,2,4,6,8,9,12,13,14)](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aminterm-maxterm-kmap-01246) — Digital Logic, chapter 3
- [K-map Σ(1,2,3,8,9,10,11,13,14)+d, POS](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-pos-form-12389) — Digital Logic, chapter 3
