5.2: Facts About the Chi-Square Distribution - Mathematics

The notation for the chi-square distribution is:

[chi sim chi^{2}_{df}]

where (df =) degrees of freedom which depends on how chi-square is being used. (If you want to practice calculating chi-square probabilities then use (df = n - 1). The degrees of freedom for the three major uses are each calculated differently.)

For the (chi^{2}) distribution, the population mean is (mu = df) and the population standard deviation is

[sigma = sqrt{2(df)}.]

The random variable is shown as (chi^{2}), but may be any upper case letter. The random variable for a chi-square distribution with (k) degrees of freedom is the sum of (k) independent, squared standard normal variables.

[chi^{2} = (Z_{1})^{2} + ... + (Z_{k})^{2}]

  1. The curve is nonsymmetrical and skewed to the right.
  2. There is a different chi-square curve for each (df).
Figure (PageIndex{1})
  1. The test statistic for any test is always greater than or equal to zero.
  2. When (df > 90), the chi-square curve approximates the normal distribution. For (chi sim chi^{2}_{1,000}) the mean, (mu = df = 1,000) and the standard deviation, (mu = sqrt{2(1,000)}). Therefore, (X sim N(1,000, 44.7)), approximately.
  3. The mean, (mu), is located just to the right of the peak.
Figure (PageIndex{2})


  1. Data from Parade Magazine.
  2. “HIV/AIDS Epidemiology Santa Clara County.”Santa Clara County Public Health Department, May 2011.


The chi-square distribution is a useful tool for assessment in a series of problem categories. These problem categories include primarily (i) whether a data set fits a particular distribution, (ii) whether the distributions of two populations are the same, (iii) whether two events might be independent, and (iv) whether there is a different variability than expected within a population.

An important parameter in a chi-square distribution is the degrees of freedom (df) in a given problem. The random variable in the chi-square distribution is the sum of squares of df standard normal variables, which must be independent. The key characteristics of the chi-square distribution also depend directly on the degrees of freedom.

The chi-square distribution curve is skewed to the right, and its shape depends on the degrees of freedom (df). For (df > 90), the curve approximates the normal distribution. Test statistics based on the chi-square distribution are always greater than or equal to zero. Such application tests are almost always right-tailed tests.

Formula Review

[chi^{2} = (Z_{1})^{2} + (Z_{2})^{2} + ... + (Z_{df})^{2}] chi-square distribution random variable

(mu_{chi^{2}} = df) chi-square distribution population mean

(sigma_{chi^{2}} = sqrt{2(df)}) Chi-Square distribution population standard deviation

Exercise (PageIndex{1})

If the number of degrees of freedom for a chi-square distribution is 25, what is the population mean and standard deviation?


mean (= 25) and standard deviation (= 7.0711)

Exercise (PageIndex{2})

If (df > 90), the distribution is _____________. If (df = 15), the distribution is ________________.

Exercise (PageIndex{3})

When does the chi-square curve approximate a normal distribution?


when the number of degrees of freedom is greater than 90

Exercise (PageIndex{4})

Where is (mu) located on a chi-square curve?

Exercise (PageIndex{5})

Is it more likely the df is 90, 20, or two in the graph?

Figure (PageIndex{3}).


(df = 2)

Recommended reading

  • Handbook of Mathematical Functions by Milton Abramowitz and Irene Stegun
  • Numerical Recipes in C by William H. Press, Flannery,Teukolsky and Vetterling
  • Schaum's Easy Outline of Probability and Statistics by John Schiller, A. Srinivasan and Murray Spiegel

Affiliate disclosure: we get a small commission for purchases made through the above links

The p -value is the area under the chi-square probability density function (pdf) curve to the right of the specified &chi 2 value. In Excel: p = CHIDIST( &chi 2 , &nu ) .

See Chi-square formulae for more details of the mathematics.


11.3.3 The Chi-Squared Distribution

The chi-squared distribution with n degrees of freedom is the distribution of χ n 2 = Z 1 2 + ⋯ + Z n 2 where Z i , i = 1 , … , n are independent standard normals. Using the fact noted in the remark at the end of Section 3.1 we see that Z 1 2 + Z 2 2 has an exponential distribution with rate 1 2 . Hence, when n is even—say, n = 2 k — χ 2 k 2 has a gamma distribution with parameters ( k , 1 2 ) . Hence, − 2 log ⁡ ( ∏ i = 1 k U i ) has a chi-squared distribution with 2k degrees of freedom. We can simulate a chi-squared random variable with 2 k + 1 degrees of freedom by first simulating a standard normal random variable Z and then adding Z 2 to the preceding. That is,

where Z , U 1 , … , U n are independent with Z being a standard normal and the others being uniform ( 0 , 1 ) random variables.

Sampling distributions

Exercises 4.2

Let Y have a chi-square distribution with 15 degrees of freedom. Find the following probabilities. (a)

Let Y have a chi-square distribution with 7 degrees of freedom. Find the following probabilities. (a)

The time to failure T of a microwave oven has an exponential distribution with pdf:

If three such microwave ovens are chosen and t ¯ is the mean of their failure times, find the following: (a)

Let X1, X2, …, X10 be a random sample from a standard normal distribution. Find the numbers a and b such that:

Let X1, X2, …, X5 be a random sample from the normal distribution with mean 55 and variance 223. Let

Find the distribution of the random variables Y and Z.

Let X and Y be independent chi-square random variables with 14 and 5 degrees of freedom, respectively. Find: (a)

A particular type of vacuum-packed coffee packet contains an average of 16 oz. It has been observed that the number of ounces of coffee in these packets is normally distributed with σ = 1.41 oz. A random sample of 15 of these coffee packets is selected, and the observations are used to calculate s. Find the numbers a and b such that P(aS 2b) = 0.90.

An optical firm buys glass slabs to be ground into lenses, and it is known that the variance of the refractive index of the glass slabs is to be no more than 1.04 × 10 −3 . The firm rejects a shipment of glass slabs if the sample variance of 16 pieces selected at random exceeds 1.15 × 10 −3 . Assuming that the sample values may be looked on as a random sample from a normal population, what is the probability that a shipment will be rejected even though σ 2 = 1.04 × 10 −3 ?

Assume that T has a t distribution with 8 degrees of freedom. Find the following probabilities. (a)

Assume that T has a t distribution with 15 degrees of freedom. Find the following probabilities. (a)

A psychologist claims that the mean age at which female children start walking is 11.4 months. If 20 randomly selected female children are found to have started walking at a mean age of 12 months with standard deviation of 2 months, would you agree with the psychologist's claim? Assume that the sample came from a normal population.

Let U1 and U2 be independent random variables. Suppose that U1 is χ 2 with v1 degrees of freedom while U = U1 + U2 is chi-square with v degrees of freedom, where v > v1. Then prove that U2 is a chi-square random variable with vv1 degrees of freedom.

Let X1, …, Xn be a random sample with Xi ∼ χ 2 (1), for i = 1, …, n. Show that the distribution of

Let X1, X2, …, Xn be a random sample from an exponential distribution with parameter θ. Show that the random variable 2 θ − 1 ( ∑ i = 1 n X i ) ∼ χ 2 ( 2 n ) .

Let X and Y be independent random variables from an exponential distribution with common parameter θ = 1. Show that X/Y has an F distribution. What is the number of the degrees of freedom?

Prove that if X has a t distribution with n degrees of freedom, then X 2 ∼ F (1, n).

Let X be F distributed with 9 numerator and 12 denominator degrees of freedom. Find (a)

Find the mean and variance of F(n1, n2) random variable.

Let X 11 , X 12 , … , X 1 n 1 be a random sample with sample mean X ¯ 1 from a normal population with mean μ1 and variance σ 1 2 , and let X 21 , X 22 , … , X 2 n 2 be a random sample with sample mean X ¯ 2 from a normal population with mean μ2 and variance σ 2 2 . Assume the two samples are independent. Show that the sampling distribution of ( X ¯ 1 − X ¯ 2 ) is normal with mean μ1μ2 and variance σ 1 2 / n 1 + σ 2 2 / n 2 .

Let X1, X2, …, Xn1 be a random sample from a normal population with mean μ1 and variance σ 2 , and Y1, Y2, …, Yn2 be a random sample from an independent normal population with mean μ2 and variance σ 2 . Show that

Show that a t distribution tends to a standard normal distribution as the degrees of freedom tend to infinity.

Show that the mgf of a χ 2 random variable with n degrees of freedom is M(t)=(1 – 2t) –n/2 . Using the mgf, show that the mean and variance of a chi-square distribution are n and 2n, respectively.

Let the random variables X1, X2, …, X10 be normally distributed with mean 8 and variance 4. Find a number a such that

The Formula for Chi-Square Is

There are two main kinds of chi-square tests: the test of independence, which asks a question of relationship, such as, "Is there a relationship between student sex and course choice?" and the goodness-of-fit test, which asks something like "How well does the coin in my hand match a theoretically fair coin?"


When considering student sex and course choice, a χ 2 test for independence could be used. To do this test, the researcher would collect data on the two chosen variables (sex and courses picked) and then compare the frequencies at which male and female students select among the offered classes using the formula given above and a χ 2 statistical table.

If there is no relationship between sex and course selection (that is, if they are independent), then the actual frequencies at which male and female students select each offered course should be expected to be approximately equal, or conversely, the proportion of male and female students in any selected course should be approximately equal to the proportion of male and female students in the sample. A χ 2 test for independence can tell us how likely it is that random chance can explain any observed difference between the actual frequencies in the data and these theoretical expectations.


χ 2 provides a way to test how well a sample of data matches the (known or assumed) characteristics of the larger population that the sample is intended to represent. If the sample data do not fit the expected properties of the population that we are interested in, then we would not want to use this sample to draw conclusions about the larger population.

For example consider an imaginary coin with exactly 50/50 chance of landing heads or tails and a real coin that you toss 100 times. If this real coin has an is fair, then it will also have an equal probability of landing on either side, and the expected result of tossing the coin 100 times is that heads will come up 50 times and tails will come up 50 times. In this case, χ 2 can tell us how well the actual results of 100 coin flips compare to the theoretical model that a fair coin will give 50/50 results. The actual toss could come up 50/50, or 60/40, or even 90/10. The farther away the actual results of the 100 tosses is from 50/50, the less good the fit of this set of tosses is to the theoretical expectation of 50/50 and the more likely we might conclude that this coin is not actually a fair coin.

5.2: Facts About the Chi-Square Distribution - Mathematics

The chi-squared distribution allows for statistical tests of categorical data. Among these tests are those for goodness of fit and independence.

12.1 The chi-squared distribution

Then c 2 has the chi-squared distribution with n degrees of freedom.

The shape of the distribution depends upon the degrees of freedom. These diagrams (figures 48 and 49) illustrate 100 random samples for 5 d.f. and 50 d.f.

Notice for a small number of degrees of freedom it is very skewed. However, as the number gets large the distribution begins to look normal. (Can you guess the mean and standard deviation?)

12.2 Chi-squared goodness of fit tests

A goodness of fit test checks to see if the data came from some specified population. The chi-squared goodness of fit test allows one to test if categorical data corresponds to a model where the data is chosen from the categories according to some specified set of probabilities. For dice rolling, the 6 categories (faces) would be assumed to be equally likely. For a letter distribution, the assumption would be that some categories are more likely than other.

Of course, you suspect that if the die is fair, the probability of each face should be the same or 1/6. In 150 rolls then you would expect each face to have about 25 appearances. Yet the 6 appears 36 times. Is this coincidence or perhaps something else?

The key to answering this question is to look at how far off the data is from the expected. If we call f i the frequency of category i , and e i the expected count of category i , then the c 2 statistic is defined to be

Intuitively this is large if there is a big discrepancy between the actual frequencies and the expected frequencies, and small if not.
Statistical inference is based on the assumption that none of the expected counts is smaller than 1 and most (80%) are bigger than 5. As well, the data must be independent and identically distributed -- that is multinomial with some specified probability distribution.
If these assumptions are satisfied, then the c 2 statistic is approximately c 2 distributed with n -1 degrees of freedom. The null hypothesis is that the probabilities are as specified, against the alternative that some are not.

Notice for our data, the categories all have enough entries and the assumption that the individual entries are multinomial follows from the dice rolls being independent.

R has a built in test for this type of problem. To use it we need to specify the actual frequencies, the assumed probabilities and the necessary language to get the result we want. In this case -- goodness of fit -- the usage is very simple The formal hypothesis test assumes the null hypothesis is that each category i has probability p i (in our example each p i = 1/6) against the alternative that at least one category doesn't have this specified probability.

As we see, the value of c 2 is 6.72 and the degrees of freedom are 6-1=5. The calculated p -value is 0.2423 so we have no reason to reject the hypothesis that the die is fair.

Do a chi-square goodness of fit hypothesis test to see if the letter proportions for this text are p E =.29, p T =.21, p N =.17, p R =.17, p O =.16 or are different.

The solution is just slightly more difficult, as the probabilities need to be specified. Since the assumptions of the chi-squared test require independence of each letter, this is not quite appropriate, but supposing it is we get This indicates that this text is unlikely to be written in English.

Some Extra Insight: Why the c s ?
What makes the statistic have the c 2 distribution? If we assume that f i - e i = Z i
( e i )
. That is the error is somewhat proportional to the square root of the expected number, then if Z i are normal with mean 0 and variance 1, then the statistic is exactly c 2 . For the multinomial distribution, one needs to verify, that asymptotically, the differences from the expected counts are roughly this large.

12.3 Chi-squared tests of independence

The same statistic can also be used to study if two rows in a contingency table are ``independent''. That is, the null hypothesis is that the rows are independent and the alternative hypothesis is that they are not independent.

For example, suppose you find the following data on the severity of a crash tabulated for the cases where the passenger had a seat belt, or did not:

which is estimated by the proportion of ``none'' (the column sum divided by n ) and the proportion of ``yes: (the row sum divided by n). The expected frequency for this cell is then this product times n . Or after simplifying, the row sum times the column sum divided by n . We need to do this for each entry. Better to let the computer do so. Here it is quite simple. This tests the null hypothesis that the two rows are independent against the alternative that they are not. In this example, the extremely small p -value leads us to believe the two rows are not independent (we reject).

Notice, we needed to make a data frame of the two values. Alternatively, one can just combine the two vectors as rows using rbind .

12.4 Chi-squared tests for homogeneity

The test for independence checked to see if the rows are independent, a test for homogeneity, tests to see if the rows come from the same distribution or appear to come from different distributions. Intuitively, the proportions in each category should be about the same if the rows are from the same distribution. The chi-square statistic will again help us decide what it means to be ``close'' to the same.

Example: A difference in distributions?
The test for homogeneity tests categorical data to see if the rows come from different distributions. How good is it? Let's see by taking data from different distributions and seeing how it does.

We can easily roll a die using the sample command. Let's roll a fair one, and a biased one and see if the chi-square test can decide the difference.

First to roll the fair die 200 times and the biased one 100 times and then tabulate:

Do these appear to be from the same distribution? We see that the biased coin has more sixes and far fewer twos than we should expect. So it clearly doesn't look so. The chi-square test for homogeneity does a similar analysis as the chi-square test for independence. For each cell it computes an expected amount and then uses this to compare to the frequency. What should be expected numbers be?

Consider how many 2's the fair die should roll in 200 rolls. The expected number would be 200 times the probability of rolling a 1. This we don't know, but if we assume that the two rows of numbers are from the same distribution, then the marginal proportions give an estimate. The marginal total is 30/300 = (26 + 4)/300 = 1/10. So we expect 200(1/10) = 20. And we had 26.

As before, we add up all of these differences squared and scale by the expected number to get a statistic:

Under the null hypothesis that both sets of data come from the same distribution (homogeneity) and a proper sample, this has the chi-squared distribution with (2-1)(6-1)=5 degrees of freedom. That is the number of rows minus 1 times the number of columns minus 1.

The heavy lifting is done for us as follows with the chisq.test function. Notice the small p -value, but by some standards we still accept the null in this numeric example.
If you wish to see some of the intermediate steps you may. The result of the test contains more information than is printed. As an illustration, if we wanted just the expected counts we can ask with the exp value of the test

12.5 Problems

Do a test of hypothesis to decide if there is a difference between the two types of programs in terms of retention.

12.2 A survey of drivers was taken to see if they had been in an accident during the previous year, and if so was it a minor or major accident. The results are tabulated by age group:

Accident Type
AGE None minor major
under 18 67 10 5
18-25 42 6 5
26-40 75 8 4
40-65 56 4 6
over 65 57 15 1

Do a chi-squared hypothesis test of homogeneity to see if there is difference in distributions based on age.

12.3 A fish survey is done to see if the proportion of fish types is consistent with previous years. Suppose, the 3 types of fish recorded: parrotfish, grouper, tang are historically in a 5:3:4 proportion and in a survey the following counts are found

Do a test of hypothesis to see if this survey of fish has the same proportions as historically.

12.4 The R dataset UCBAdmissions contains data on admission to UC Berkeley by gender. We wish to investigate if the distribution of males admitted is similar to that of females.

To do so, we need to first do some spade work as the data set is presented in a complex contingency table. The ftable (flatten table) command is needed. To use it try We want to compare rows 1 and 2. Treating x as a matrix, we can access these with x[1:2,] .

Do a test for homogeneity between the two rows. What do you conclude? Repeat for the rejected group.

Department of Mathematics
College of Staten Island
City University of New York
1S-215, 2800 Victory Boulevard, Staten Island, NY 10314
(718) 982-3600
This website was created using Twitter Bootstrap, Blosxom, and Glyphicons Free.


Probability density function

A probability density function of the chi-square distribution is

where denotes the Gamma function, which takes particular values at the half-integers.

Cumulative distribution function

where /> is the lower incomplete Gamma function and /> is the regularized Gamma function.

Tables of this distribution — usually in its cumulative form — are widely available and the function is included in many spreadsheets and all statistical packages.

Characteristic function

The characteristic function of the Chi-square distribution is

ANOVA, Regression, and Chi-Square

A variety of statistical procedures exist. The appropriate statistical procedure depends on the research question(s) we are asking and the type of data we collected. While EPSY 5601 is not intended to be a statistics class, some familiarity with different statistical procedures is warranted.

Parametric Data Analysis

Investigating Differences

One Independent Variable (With Two Levels) and One Dependent Variable

When we wish to know whether the means of two groups (one independent variable (e.g., gender) with two levels (e.g., males and females) differ, a t test is appropriate. In order to calculate a t test, we need to know the mean, standard deviation, and number of subjects in each of the two groups. An example of a t test research question is “Is there a significant difference between the reading scores of boys and girls in sixth grade?” A sample answer might be, “Boys (M=5.67, SD=.45) and girls (M=5.76, SD=.50) score similarly in reading, t(23)=.54, p>.05.” [Note: The (23) is the degrees of freedom for a t test. It is the number of subjects minus the number of groups (always 2 groups with a t-test). In this example, there were 25 subjects and 2 groups so the degrees of freedom is 25-2=23.] Remember, a t test can only compare the means of two groups (independent variable, e.g., gender) on a single dependent variable (e.g., reading score). You may wish to review the instructor notes for t tests.

One Independent Variable (With More Than Two Levels) and One Dependent Variable

If the independent variable (e.g., political party affiliation) has more than two levels (e.g., Democrats, Republicans, and Independents) to compare and we wish to know if they differ on a dependent variable (e.g., attitude about a tax cut), we need to do an ANOVA (ANalysis Of VAriance). In other words, if we have one independent variable (with three or more groups/levels) and one dependent variable, we do a one-way ANOVA. A sample research question is, “Do Democrats, Republicans, and Independents differ on their option about a tax cut?” A sample answer is, “Democrats (M=3.56, SD=.56) are less likely to favor a tax cut than Republicans (M=5.67, SD=.60) or Independents (M=5.34, SD=.45), F(2,120)=5.67, p<.05.” [Note: The (2,120) are the degrees of freedom for an ANOVA. The first number is the number of groups minus 1. Because we had three political parties it is 2, 3-1=2. The second number is the total number of subjects minus the number of groups. Because we had 123 subject and 3 groups, it is 120 (123-3)]. The one-way ANOVA has one independent variable (political party) with more than two groups/levels (Democrat, Republican, and Independent) and one dependent variable (attitude about a tax cut).

More Than One Independent Variable (With Two or More Levels Each) and One Dependent Variable

ANOVAs can have more than one independent variable. A two-way ANOVA has two independent variable (e.g. political party and gender), a three-way ANOVA has three independent variables (e.g., political party, gender, and education status), etc. These ANOVA still only have one dependent variable (e.g., attitude about a tax cut). A two-way ANOVA has three research questions: One for each of the two independent variables and one for the interaction of the two independent variables.

Sample Research Questions for a Two-Way ANOVA:
Do Democrats, Republicans, and Independents differ on their opinion about a tax cut?
Do males and females differ on their opinion about a tax cut?
Is there an interaction between gender and political party affiliation regarding opinions about a tax cut?

A two-way ANOVA has three null hypotheses, three alternative hypotheses and three answers to the research question. The answers to the research questions are similar to the answer provided for the one-way ANOVA, only there are three of them.

One or More Independent Variables (With Two or More Levels Each) and More Than One Dependent Variable

Sometimes we have several independent variables and several dependent variables. In this case we do a MANOVA (Multiple ANalysis Of VAriance). Suffices to say, multivariate statistics (of which MANOVA is a member) can be rather complicated.

Investigating Relationships

Sometimes we wish to know if there is a relationship between two variables. A simple correlation measures the relationship between two variables. The variables have equal status and are not considered independent variables or dependent variables. In our class we used Pearson‘s r which measures a linear relationship between two continuous variables. While other types of relationships with other types of variables exist, we will not cover them in this class. A sample research question for a simple correlation is, “What is the relationship between height and arm span?” A sample answer is, “There is a relationship between height and arm span, r(34)=.87, p<.05.” You may wish to review the instructor notes for correlations. A canonical correlation measures the relationship between sets of multiple variables (this is multivariate statistic and is beyond the scope of this discussion).

An extension of the simple correlation is regression. In regression, one or more variables (predictors) are used to predict an outcome (criterion). One may wish to predict a college student’s GPA by using his or her high school GPA, SAT scores, and college major. Data for several hundred students would be fed into a regression statistics program and the statistics program would determine how well the predictor variables (high school GPA, SAT scores, and college major) were related to the criterion variable (college GPA). Based on the information, the program would create a mathematical formula for predicting the criterion variable (college GPA) using those predictor variables (high school GPA, SAT scores, and/or college major) that are significant. Not all of the variables entered may be significant predictors. A sample research question might be, “What is the individual and combined power of high school GPA, SAT scores, and college major in predicting graduating college GPA?” The output of a regression analysis contains a variety of information. R 2 tells how much of the variation in the criterion (e.g., final college GPA) can be accounted for by the predictors (e.g., high school GPA, SAT scores, and college major (dummy coded 0 for Education Major and 1 for Non-Education Major). A research report might note that “High school GPA, SAT scores, and college major are significant predictors of final college GPA, R 2 =.56.” In this example, 56% of an individual’s college GPA can be predicted with his or her high school GPA, SAT scores, and college major). The regression equation for such a study might look like the following: Y’= .15 + (HS GPA * .75) + (SAT * .001) + (Major * -.75). By inserting an individual’s high school GPA, SAT score, and college major (0 for Education Major and 1 for Non-Education Major) into the formula, we could predict what someone’s final college GPA will be (well…at least 56% of it). For example, someone with a high school GPA of 4.0, SAT score of 800, and an education major (0), would have a predicted GPA of 3.95 (.15 + (4.0 * .75) + (800 * .001) + (0 * -.75)). Universities often use regression when selecting students for enrollment.

I have created a sample SPSS regression printout with interpretation if you wish to explore this topic further. You will not be responsible for reading or interpreting the SPSS printout.

Non Parametric Data Analysis

We might count the incidents of something and compare what our actual data showed with what we would expect. Suppose we surveyed 27 people regarding whether they preferred red, blue, or yellow as a color. If there were no preference, we would expect that 9 would select red, 9 would select blue, and 9 would select yellow. We use a chi-square to compare what we observe (actual) with what we expect. If our sample indicated that 2 liked red, 20 liked blue, and 5 liked yellow, we might be rather confident that more people prefer blue. If our sample indicated that 8 liked read, 10 liked blue, and 9 liked yellow, we might not be very confident that blue is generally favored. Chi-square helps us make decisions about whether the observed outcome differs significantly from the expected outcome. A sample research question is, “Is there a preference for the red, blue, and yellow color?” A sample answer is “There was not equal preference for the colors red, blue, or yellow. More people preferred blue than red or yellow, X 2 (2) = 12.54, p < .05″. Just as t-tests tell us how confident we can be about saying that there are differences between the means of two groups, the chi-square tells us how confident we can be about saying that our observed results differ from expected results.

Each of the stats produces a test statistic (e.g., t, F, r, R 2 , X 2 ) that is used with degrees of freedom (based on the number of subjects and/or number of groups) that are used to determine the level of statistical significance (value of p). Ultimately, we are interested in whether p is less than or greater than .05 (or some other value predetermined by the researcher). It all boils down the the value of p. If p<.05 we say there are differences for t-tests, ANOVAs, and Chi-squares or there are relationships for correlations and regressions.

Thanks to improvements in computing power, data analysis has moved beyond simply comparing one or two variables into creating models with sets of variables. Structural Equation Modeling and Hierarchical Linear Modeling are two examples of these techniques. Structural Equation Modeling (SEM) analyzes paths between variables and tests the direct and indirect relationships between variables as well as the fit of the entire model of paths or relationships. For example, a researcher could measure the relationship between IQ and school achievment, while also including other variables such as motivation, family education level, and previous achievement.

The example below shows the relationships between various factors and enjoyment of school. When a line connects to variable, there is a relationship. If two variable are not related, they are not connected by a line. The strengths of the relationships are indicated on the lines. In this model we can see that there is a positive relationship between Parents’ Education Level and students’ Scholastic Ability. We can see that there is not a relationship between Teacher Perception of Academic Skills and students’ Enjoyment of School. We can see there is a negative relationship between students’ Scholastic Ability and their Enjoyment of School. See D. Betsy McCoach’s article for more information on SEM.

Often the educational data we collect violates the important assumption of independence that is required for the simpler statistical procedures. Students are often grouped (nested) in classrooms. Those classrooms are grouped (nested) in schools. The schools are grouped (nested) in districts. This nesting violates the assumption of independence. Hierarchical Linear Modeling (HLM) was designed to work with nested data. HLM allows researchers to measure the effect of the classroom, as well as the effect of attending a particular school, as well as measuring the effect of being a student in a given district on some selected variable, such as mathematics achievement. For more information on HLM, see D. Betsy McCoach’s article.

Critical Values of the Chi-Square Distribution

This table contains the basic estimations of the chi-square circulation. On account of the absence of balance of the chi-square appropriation, separate tables are accommodated the upper and lower tails of the dispersion.

A test measurement with ν degrees of opportunity is processed from the information. For upper-tail uneven tests, the test measurement is contrasted and an incentive from the table of upper-tail basic qualities. For two-sided tests, the test measurement is contrasted and values from both the table for the upper-tail basic qualities and the table for the lower-tail basic qualities.

The significance level, α, is demonstrated with the graph below which shows a chi-square distribution with 3 degrees of freedom for a two-sided test at significance level α = 0.05. If the test statistic is greater than the upper-tail critical value or less than the lower-tail critical value, we reject the null hypothesis. Specific instructions are given below

Given a specified value of α:

For a two-sided test, discover the segment comparing to 1-α/2 in the table for upper-tail basic qualities and reject the invalid theory if the test measurement is more prominent than the postponed worth. Essentially, discover the section comparing to α/2 in the table for lower-tail basic qualities and reject the invalid theory if the test measurement is not exactly the postponed worth.

For an upper-tail uneven test, discover the section comparing to 1-α in the table containing upper-tail basic and reject the invalid speculation if the test measurement is more prominent than the postponed worth.

For a lower-tail uneven test, discover the section comparing to α in the lower-tail basic qualities table and reject the invalid theory if the registered test measurement is not exactly the postponed worth.

Upper-tail critical values of chi-square distribution with ν degrees of freedom

Probability less than the critical value

1 2.706 3.841 5.024 6.635 10.828

2 4.605 5.991 7.378 9.210 13.816

3 6.251 7.815 9.348 11.345 16.266

4 7.779 9.488 11.143 13.277 18.467

5 9.236 11.070 12.833 15.086 20.515

6 10.645 12.592 14.449 16.812 22.458

7 12.017 14.067 16.013 18.475 24.322

8 13.362 15.507 17.535 20.090 26.125

9 14.684 16.919 19.023 21.666 27.877

10 15.987 18.307 20.483 23.209 29.588

11 17.275 19.675 21.920 24.725 31.264

12 18.549 21.026 23.337 26.217 32.910

13 19.812 22.362 24.736 27.688 34.528

14 21.064 23.685 26.119 29.141 36.123

15 22.307 24.996 27.488 30.578 37.697

16 23.542 26.296 28.845 32.000 39.252

17 24.769 27.587 30.191 33.409 40.790

18 25.989 28.869 31.526 34.805 42.312

19 27.204 30.144 32.852 36.191 43.820

20 28.412 31.410 34.170 37.566 45.315

21 29.615 32.671 35.479 38.932 46.797

22 30.813 33.924 36.781 40.289 48.268

23 32.007 35.172 38.076 41.638 49.728

24 33.196 36.415 39.364 42.980 51.179

25 34.382 37.652 40.646 44.314 52.620

26 35.563 38.885 41.923 45.642 54.052

27 36.741 40.113 43.195 46.963 55.476

28 37.916 41.337 44.461 48.278 56.892

29 39.087 42.557 45.722 49.588 58.301

30 40.256 43.773 46.979 50.892 59.703

31 41.422 44.985 48.232 52.191 61.098

32 42.585 46.194 49.480 53.486 62.487

33 43.745 47.400 50.725 54.776 63.870

34 44.903 48.602 51.966 56.061 65.247

35 46.059 49.802 53.203 57.342 66.619

36 47.212 50.998 54.437 58.619 67.985

37 48.363 52.192 55.668 59.893 69.347

38 49.513 53.384 56.896 61.162 70.703

39 50.660 54.572 58.120 62.428 72.055

40 51.805 55.758 59.342 63.691 73.402

41 52.949 56.942 60.561 64.950 74.745

42 54.090 58.124 61.777 66.206 76.084

43 55.230 59.304 62.990 67.459 77.419

44 56.369 60.481 64.201 68.710 78.750

45 57.505 61.656 65.410 69.957 80.077

46 58.641 62.830 66.617 71.201 81.400

47 59.774 64.001 67.821 72.443 82.720

48 60.907 65.171 69.023 73.683 84.037

49 62.038 66.339 70.222 74.919 85.351

50 63.167 67.505 71.420 76.154 86.661

51 64.295 68.669 72.616 77.386 87.968

52 65.422 69.832 73.810 78.616 89.272

53 66.548 70.993 75.002 79.843 90.573

54 67.673 72.153 76.192 81.069 91.872

55 68.796 73.311 77.380 82.292 93.168

56 69.919 74.468 78.567 83.513 94.461

57 71.040 75.624 79.752 84.733 95.751

58 72.160 76.778 80.936 85.950 97.039

59 73.279 77.931 82.117 87.166 98.324

60 74.397 79.082 83.298 88.379 99.607

61 75.514 80.232 84.476 89.591 100.888

62 76.630 81.381 85.654 90.802 102.166

63 77.745 82.529 86.830 92.010 103.442

64 78.860 83.675 88.004 93.217 104.716

65 79.973 84.821 89.177 94.422 105.988

66 81.085 85.965 90.349 95.626 107.258

67 82.197 87.108 91.519 96.828 108.526

68 83.308 88.250 92.689 98.028 109.791

69 84.418 89.391 93.856 99.228 111.055

70 85.527 90.531 95.023 100.425 112.317

71 86.635 91.670 96.189 101.621 113.577

72 87.743 92.808 97.353 102.816 114.835

73 88.850 93.945 98.516 104.010 116.092

74 89.956 95.081 99.678 105.202 117.346

75 91.061 96.217 100.839 106.393 118.599

76 92.166 97.351 101.999 107.583 119.850

77 93.270 98.484 103.158 108.771 121.100

78 94.374 99.617 104.316 109.958 122.348

79 95.476 100.749 105.473 111.144 123.594

80 96.578 101.879 106.629 112.329 124.839

81 97.680 103.010 107.783 113.512 126.083

82 98.780 104.139 108.937 114.695 127.324

83 99.880 105.267 110.090 115.876 128.565

84 100.980 106.395 111.242 117.057 129.804

85 102.079 107.522 112.393 118.236 131.041

86 103.177 108.648 113.544 119.414 132.277

87 104.275 109.773 114.693 120.591 133.512

88 105.372 110.898 115.841 121.767 134.746

89 106.469 112.022 116.989 122.942 135.978

90 107.565 113.145 118.136 124.116 137.208

91 108.661 114.268 119.282 125.289 138.438

92 109.756 115.390 120.427 126.462 139.666

93 110.850 116.511 121.571 127.633 140.893

94 111.944 117.632 122.715 128.803 142.119

95 113.038 118.752 123.858 129.973 143.344

96 114.131 119.871 125.000 131.141 144.567

97 115.223 120.990 126.141 132.309 145.789

98 116.315 122.108 127.282 133.476 147.010

99 117.407 123.225 128.422 134.642 148.230

100 118.498 124.342 129.561 135.807 149.449

100 118.498 124.342 129.561 135.807 149.449

Lower-tail critical values of chi-square distribution with ν degrees of freedom

5.5 Exercises

Exercise 5.1
Case study: air pollution
Topic: comparing air pollution in Rotterdam location Statenweg, and Amsterdam location Einsteinweg. The selected stations are representative of the city centers.
Hypothesis, based on literature review:
HA: (pi) Rotterdam > (pi) Amsterdam,
where (pi) Rotterdam ( (pi) Amsterdam) is the proportion of days in 2018 with an average PM10 level above 30 (mu) gram per m 3 in Rotterdam (Amsterdam) according to the WHO standard a daily average of more than 30 (mu) gram per m 3 is defined as unhealthy.
Data has been collected from the RIVM website.
Assume that from the 365 days, the number of ‘unhealthy’ days in Rotterdam is 85 and in Amsterdam 69. Is this difference significant? In other words, do this data support the hypothesis.

  1. Test the hypothesis that more than 10% of the houses sold have a selling price of more than 1 mln GBP.
  2. A broker states that based on historic figures houses in the Bromley district are more expensive than houses in the Croydon district. Perform a test to see if the selling prices in January 2019 give support to this assumption.
  3. Test if there is a significant difference between the proportion flats of all houses sold in the EALING district and in the GREENWICH district.
  4. “The proportion houses with a selling price of more than 1 mln GBP for the category terraced houses is higher than for the category semi-detached houses.”
    Test if the data support this statement.
  5. Use the figures of the first full week of January to test if the home sales are uniformly distributed over the weekdays. Use a chi-square goodness of fit test.
  6. Use a chi-square-of-FIT-test to test if the distribution of prices of detached houses sold is: 20% less than 500,000 GPB, 20% between 500,000 and 1,000,000 GPB, 20% between 1,000,000 and 1,500,000 GBP, 20% between 1,500,000 and 2,000,000 GPB and 20% more than 2,000,000 GBP.

Exercise 5.3
Case: Ducth cars, brands: AUDI, CITROEN, FORD, OPEL File: 20190605rdw.xlsx this file contains information from a random sample of 1000 Dutch cars

The data set is not a random sample from all registered cars in the Netherlands it is a random sample from registered cars from three brands, KIA, BMW and AUDI because of didactic reasons, KIA PICANTO’s are excluded from the sample.↩

P-values for common tests can be calculated with this web app.↩

which sample size is large enough depends on the form of the distribution in the population most textbooks say n = 30 is large enough, in most situations it is assumed that even n = 20 is large enough to use a t-test if it may be assumed that the population distribution is symmetric even n = 10 may be large enough.↩