Home > Statistical Methods calculators > Chi square test example

4. Non parametric test - Chi square test example ( Enter your problem )
  1. Example-1
  2. Example-2
Other related methods
  1. Non parametric test - Sign test
  2. Non parametric test - Mann whitney U test
  3. Non parametric test - Kruskal-wallis test
  4. Non parametric test - Chi square test
  5. Non parametric test - Median test
  6. Non parametric test - Mood's Median test
  7. Parametric test - F test
  8. Parametric test - t-test
  9. Parametric test - Standard error

3. Non parametric test - Kruskal-wallis test
(Previous method)
2. Example-2
(Next example)

1. Example-1





1. Non parametric test - Chi square test for the following data
18,36,21,9,6
12,36,45,36,21
6,9,9,3,3
3,9,9,6,3, Significance Level `alpha=0.05` and One-tailed test


Solution:
Step-1:State the hypothesis
`H_0`: two categories variables are independent.

`H_1`: two categories variables are not independent.


Step-2:Observed Frequencies
`B_1``B_2``B_3``B_4``B_5`Total
`A_1`1836219690
`A_2`1236453621150
`A_3`6993330
`A_4`3996330
Total3990845433300


Step-3:Expected Frequencies Steps

`E_(i,j)=("RowTot"_i xx "ColTot"_j)/("GrandTot"`

`E_(1,1)=(90xx39)/(300)=11.7`

`E_(1,2)=(90xx90)/(300)=27`

`E_(1,3)=(90xx84)/(300)=25.2`

`E_(1,4)=(90xx54)/(300)=16.2`

`E_(1,5)=(90xx33)/(300)=9.9`

`E_(2,1)=(150xx39)/(300)=19.5`

`E_(2,2)=(150xx90)/(300)=45`

`E_(2,3)=(150xx84)/(300)=42`

`E_(2,4)=(150xx54)/(300)=27`

`E_(2,5)=(150xx33)/(300)=16.5`

`E_(3,1)=(30xx39)/(300)=3.9`

`E_(3,2)=(30xx90)/(300)=9`

`E_(3,3)=(30xx84)/(300)=8.4`

`E_(3,4)=(30xx54)/(300)=5.4`

`E_(3,5)=(30xx33)/(300)=3.3`

`E_(4,1)=(30xx39)/(300)=3.9`

`E_(4,2)=(30xx90)/(300)=9`

`E_(4,3)=(30xx84)/(300)=8.4`

`E_(4,4)=(30xx54)/(300)=5.4`

`E_(4,5)=(30xx33)/(300)=3.3`


Step-3:Expected Frequencies
`B_1``B_2``B_3``B_4``B_5`Total
`A_1`11.72725.216.29.990
`A_2`19.545422716.5150
`A_3`3.998.45.43.330
`A_4`3.998.45.43.330
Total3990845433300


Step-4: Compute Chi-square
`chi^2=sum (O_(ij)-E_(ij))^2/(E_(ij))`

`=(18-11.7)^2/11.7+(36-27)^2/27+(21-25.2)^2/25.2+(9-16.2)^2/16.2+(6-9.9)^2/9.9+(12-19.5)^2/19.5+(36-45)^2/45+(45-42)^2/42+(36-27)^2/27+(21-16.5)^2/16.5+(6-3.9)^2/3.9+(9-9)^2/9+(9-8.4)^2/8.4+(3-5.4)^2/5.4+(3-3.3)^2/3.3+(3-3.9)^2/3.9+(9-9)^2/9+(9-8.4)^2/8.4+(6-5.4)^2/5.4+(3-3.3)^2/3.3`

`=39.69/11.7+81/27+17.64/25.2+51.84/16.2+15.21/9.9+56.25/19.5+81/45+9/42+81/27+20.25/16.5+4.41/3.9+0/9+0.36/8.4+5.76/5.4+0.09/3.3+0.81/3.9+0/9+0.36/8.4+0.36/5.4+0.09/3.3`

`=3.3923+3+0.7+3.2+1.5364+2.8846+1.8+0.2143+3+1.2273+1.1308+0+0.0429+1.0667+0.0273+0.2077+0+0.0429+0.0667+0.0273`

`=23.5669`

Step-5: Compute the degrees of freedom (df).
`df=(4-1)*(5-1)=12`

Step-6:for 12 df, `p(chi^2>=23.5669)=0.0233`

Since the p-value(0.0233) < `alpha(0.05)` (one-tailed test), we reject the null hypothesis `H_0`.




This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



3. Non parametric test - Kruskal-wallis test
(Previous method)
2. Example-2
(Next example)





Share this solution or page with your friends.


 
Copyright © 2024. All rights reserved. Terms, Privacy
 
 

.