Find top 1on1 online tutors for Coding, Math, Science, AP and 50+ subjects
Tutoring
Tutors by Subject
Computer Science
Math
AP (Advanced Placement)
Courses
Coding Classes for Kids
Robotics Classes for Kids
Design Classes for Kids
Resources
AP (Advanced Placement)
Calculators
Length Calculators
Weight Calculators
Tools
Tutorials
Scratch Tutorial
Learn
Math Tutorials
AP Statistics Tutorials
Python Tutorials
Blog
A chisquare test is a statistical test used to compare observed results with expected results. It is data analysis based on the observations of a random set of variables and is used to compare sets of statistical data.
Chisquare tests are used in hypothesis testing where a condition can be true, and it is tested afterward. The tests are used to estimate the inconsistency between the actual results and the expected results using the number of variables and the size of the samples.
The test is used to estimate how likely the observations made would be, by considering the null hypothesis to be true.
The null hypothesis is a hypothesis in which the sample observations result from chance. The null hypothesis is a kind of hypothesis that explains the population parameter whose purpose is to test the validity of the given experimental data.
Want to learn AP Statistics from experts? Explore Wiingy’s Online AP Statistics tutoring services to learn from top mathematicians and experts.
The hypothesis interpretation and the value of P relation is as follows:
If then the hypothesis is rejected.
If then the hypothesis is accepted.
The Chisquare test which is also called the test is used mainly in three different types of statistical circumstances. The following will help to assess which one can be used as an appropriate inference procedure for categorical data.
The alternate and null hypotheses are:
: the populations follow the same distribution.
: the population has different distributions.
: the population fits the given distribution.
: the population does not fit the given distribution.
The alternate and null hypotheses are:
: the two variables are independent.
: the two variables are dependent.
Some of the major properties of the chisquare test are:
The formula for the chisquare test is to check the difference between the observed value and expected value.
The formula is:
Where,
is the observed value,
is the expected value.
The table is as follows:
If the obtained value of is higher than the critical value then we can reject the hypothesis, if it is lesser, we can accept the null hypothesis.
Example 1: Calculate the ChiSquare value of the following data of cars by each family in the area using the data given in the table below.
Number of cars 


One car  25  20.4 
Two cars  13  11 
Three cars  7  5.9 
Total  45 
Solution 1:
To find the chisquare let us use the formula:
Finding for each category we get
One car  1.04 
Two cars  0.36 
Three cars  0.21 
Hence =
The chisquare value is 1.61.
Example 2: The number of corn dogs sold during a carnival to men, women, and children and the percentage of the total corndogs bought is as follows. Find the Chisquare value.
Category 
 Percentages 
Men  64  40 
Women  45  20 
Children  50  20 
Total  159 
Solution 2:
First, we need to find the expected value for each category.
Category 

Men 

Women 

Children 

Now let us use the formula to calculate the value of for each category.
Category 

Men  0.002 
Women  5.439 
Children  10.416 
Now we find the sum of the calculated values to get .
Hence, =.
Example 3: The number of times (in million) the songs by different artists has been streamed is as follows. Find the ChiSquare.
Artists 


Drake  13  11 
Travis Scott  25  22 
Solution 3:
To find the chisquare let us use the formula:
Findingfor each artist we get:
Artists 

Drake  0.36 
Travis Scott  0.41 
Hence =
The chisquare value is 0.77.
Example 4: The sample for the voting of prom queen is given as follows. Prom queen 1 and 2 are two girls who were nominated for it.
Prom queen 1  Prom queen 2  Total  
Male  10  12  22 
Female  14  6  20 
Total  24  18  42 
Find out if gender has anything to do with the prom queen preference.
Solution 4:
We first define a hypothesis.
: There is no link between gender and prom queen preference.
: There is a link between gender and prom queen preference.
Now let’s calculate the expected values for each cell using:
.
Prom queen 1  Prom queen 2  Total  
Male  12.57  9.42  22 
Female  11.42  8.57  20 
Total  24  18  42 
Now we need to calculate for each cell.
Prom queen 1  Prom queen 2  
Male  0.525  0.706 
Female  0.583  0.770 
Now to calculate we need to add all the calculated values in the previous table.
Hence, the value of is 2.584.
Let us find the value of which is:
We use the value to determine the critical value using from the table.
We get the critical value to be 3.841.
We can see that our value (2.584) is lesser than the obtained critical value (3.841).
Hence, we can accept our null hypothesis.
Example 5: In a survey of cars, a sample of the study of the number of Audi cars and Jeep cars in two cities, city1, and city2 are as follows. Find the chisquare and see if there is a link between the cities and the type of cars used.
City1  City2  Total  
Audi  45  60  105 
Jeep  50  40  90 
Total  95  100  195 
Solution 5:
We first define a hypothesis.
: There is no link between gender and prom queen preference.
: There is a link between gender and prom queen preference.
Now let’s calculate the expected values for each cell using:
City1  City2  Total  
Audi  51.15  53.85  105 
Jeep  43.85  46.15  90 
Total  95  100  195 
Now we need to calculate for each cell.
City1  City2  
Audi  0.739  0.702 
Jeep  0.863  0.820 
Now to calculate we need to add all the calculated values in the previous table.
Hence, the value of is 3.124.
Let us find the value of which is:
We use the value to determine the critical value using from the table.
We get the critical value to be 3.841.
We can see that our value (3.124) is lesser than the obtained critical value (3.841).
Hence, we can accept our null hypothesis.
The chisquare test is a very important topic in the statistical analysis of random data sets and is used in the daytoday analysis of expected values. We learned how the chisquared distribution works and how to find the related values. We also learned how the chisquare value and the critical value are related.
Want to learn AP Statistics from experts? Explore Wiingy’s Online AP Statistics tutoring services to learn from top mathematicians and experts.
The Chisquare value of 5 is considered to be good. The anticipated frequency must be at least five for a chisquare method to be reliable.
Critical value in statistics is a cutoff value that is compared with a test statistic in hypothesis testing to check whether the null hypothesis should be rejected or not.
The hypothesis needs more attention.
It is an essential idea that appears in many contexts throughout statistics including hypothesis tests, probability distributions, and linear regression.
The data used in calculating a chisquare statistic must be random, raw, mutually exclusive, drawn from independent variables, and drawn from a large enough sample.
Lancaster, H. O., & Seneta, E. (2005). Chi‐square distribution. Encyclopedia of biostatistics, 2.