Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Chi-Square Test for Goodness of Fit, Exams of Statistics

The Chi-Square Goodness of Fit Test, which is used to determine whether observed sample frequencies differ significantly from expected frequencies specified in the null hypothesis. It outlines the conditions that need to be met for the test to be appropriate and describes the steps involved in analyzing sample data. The document also provides an example problem to help readers understand how to apply the test in practice.

Typology: Exams

2022/2023

Available from 11/08/2023

khalif-jay
khalif-jay 🇬🇧

1

(3)

1.7K documents

1 / 15

Toggle sidebar

Related documents


Partial preview of the text

Download Chi-Square Test for Goodness of Fit and more Exams Statistics in PDF only on Docsity! Chi-Square Predition Text 2023  Chi-Square Test for Goodness of Fit - Chi-Square Goodness of Fit Test:  Used when:  Test method. Use the chi-square goodness of fit test to determine whether observed sample frequencies differ significantly from expected frequencies specified in the null hypothesis.  -1 categorical variable  -1- population  -Appropriate when these conditions are met:  -The sampling method is simple random sampling.  -The population is at least 10 times as large as the sample.  -The variable under study is categorical.  -The expected value of the number of sample observations in each level of the variable is at least 5.  (Q): Hypothesis Test  (S): Sample Test  (T): 1 categorical variable  (N): 1 sample from 1 population  Hypothesis:  That is, if one is true, the other must be false; and vice versa.  H0: The data are consistent with a specified distribution.  Ha: The data are not consistent with a specified distribution.  Analyze Sample Data  Using sample data, find the degrees of freedom, expected frequency counts, test statistic, and the P-value associated with the test statistic.  Degrees of freedom: k-1  is equal to the number of levels (k) of the categorical variable minus  Expected frequency counts. The expected frequency counts at each level of the categorical variable are equal to the sample size times the hypothesized proportion from the null hypothesis  Ei = npi  where Ei is the expected frequency count for the ith level of the categorical variable, n is the total sample size, and pi is the hypothesized proportion of observations in level i.  Test statistic. The test statistic is a chi-square random variable (Χ2) defined by the following equation.  Χ2 = Σ [ (Oi - Ei)2 / Ei ]  where Oi is the observed frequency count for the ith level of the categorical variable, and Ei is the expected frequency count for the ith level of the categorical variable.  Formulate an Analysis Plan  The analysis plan describes how to use sample data to accept or reject the null hypothesis. The plan should specify the following elements.  Significance level. Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.  Test method. Use the chi-square test for independence to determine whether there is a significant relationship between two categorical variables.  Analyze Sample Data  Using sample data, find the degrees of freedom, expected frequencies, test statistic, and the P-value associated with the test statistic. The approach described in this section is illustrated in the sample problem at the end of this lesson.  Degrees of freedom. The degrees of freedom (DF) is equal to:  DF = (r - 1) * (c - 1)  where r is the number of levels for one catagorical variable, and c is the number of levels for the other categorical variable.  Expected frequencies. The expected frequency counts are computed separately for each level of one categorical variable at each level of the other categorical variable. Compute r * c expected frequencies, according to the following formula.  Er,c = (nr * nc) / n  where Er,c is the expected frequency count for level r of Variable A and level c of Variable B, nr is the total number of sample observations at level r of Variable A, nc is the total number of sample observations at level c of Variable B, and n is the total sample size.  Test statistic. The test statistic is a chi-square random variable (Χ2) defined by the following equation.  Χ2 = Σ [ (Or,c - Er,c)2 / Er,c ]  where Or,c is the observed frequency count at level r of Variable A and level c of Variable B, and Er,c is the expected frequency count at level r of Variable A and level c of Variable B.  P-value. The P-value is the probability of observing a sample statistic as extreme as the test statistic. Since the test statistic is a chi-square, use the Chi-Square Distribution Calculator to assess the probability associated with the test statistic. Use the degrees of freedom computed above.  Interpret Results  If the sample findings are unlikely, given the null hypothesis, the researcher rejects the null hypothesis. Typically, this involves comparing the P-value to the significance level, and rejecting the null hypothesis when the P-value is less than the significance level.  Test Your Understanding of This Lesson  Problem  A public opinion poll surveyed a simple random sample of 1000 voters. Respondents were classified by gender (male or female) and by voting preference (Republican, Democrat, or Independent). Results are shown in the contingency table below.  Voting Preferences Row total  Republican Democrat Independent  Male 200 150 50 400  Female 250 300 50 600  Column total 450 450 100 1000  Is there a gender gap? Do the men's voting preferences differ significantly from the women's preferences? Use a 0.05 level of significance.  Solution  The solution to this problem takes four steps: (1) state the hypotheses, (2) formulate an analysis plan, (3) analyze sample data, and (4) interpret results. We work through those steps below:  State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.  H0: Gender and voting preferences are independent.  Ha: Gender and voting preferences are not independent.  Formulate an analysis plan. For this analysis, the significance level is 0.05. Using sample data, we will conduct a chi-square test for independence.  Analyze sample data. Applying the chi-square test for independence to sample data, we compute the degrees of freedom, the expected frequency counts, and the chi-square test statistic. Based on the chi-square statistic and the degrees of freedom, we determine the P-value.  DF = (r - 1) * (c - 1) = (2 - 1) * (3 - 1) = 2  Er,c = (nr * nc) / n  E1,1 = (400 * 450) / 1000 = 180000/1000 = 180  If sample data are displayed in a contingency table (Populations x -----Category levels), the expected frequency count for each cell of the table is at least 5.  This approach consists of four steps:  state the hypotheses,  formulate an analysis plan,  analyze sample data, and  interpret results.  State the Hypotheses  Every hypothesis test requires the analyst to state a null hypothesis and an alternative hypothesis. The hypotheses are stated in such a way that they are mutually exclusive. That is, if one is true, the other must be false; and vice versa.  Suppose that data were sampled from r populations, and assume that the categorical variable had c levels. At any specified level of the categorical variable, the null hypothesis states that each population has the same proportion of observations. Thus,  H0: Plevel 1 of population 1 = Plevel 1 of population 2 = . . . = Plevel 1 of population r  H0: Plevel 2 of population 1 = Plevel 2 of population 2 = . . . = Plevel 2 of population r  . . .  H0: Plevel c of population 1 = Plevel c of population 2 = . . . = Plevel c of population r  The alternative hypothesis (Ha) is that at least one of the null hypothesis statements is false.  Formulate an Analysis Plan  The analysis plan describes how to use sample data to accept or reject the null hypothesis. The plan should specify the following elements.  Significance level. Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.  Test method. Use the chi-square test for homogeneity to determine whether observed sample frequencies differ significantly from expected frequencies specified in the null hypothesis. The chi-square test for homogeneity is described in the next section.  Analyze Sample Data  Using sample data from the contingency tables, find the degrees of freedom, expected frequency counts, test statistic, and the P-value associated with the test statistic. The analysis described in this section is illustrated in the sample problem at the end of this lesson.  Degrees of freedom. The degrees of freedom (DF) is equal to:  DF = (r - 1) * (c - 1)  where r is the number of populations, and c is the number of levels for the categorical variable.  Expected frequency counts. The expected frequency counts are computed separately for each population at each level of the categorical variable, according to the following formula.  Er,c = (nr * nc) / n  where Er,c is the expected frequency count for population r at level c of the categorical variable, nr is the total number of observations from population r, nc is the total number of observations at treatment level c, and n is the total sample size.  Test statistic. The test statistic is a chi-square random variable (Χ2) defined by the following equation.  Χ2 = Σ [ (Or,c - Er,c)2 / Er,c ]  where Or,c is the observed frequency count in population r for level c of the categorical variable, and Er,c is the expected frequency count in population r for level c of the categorical variable.  P-value. The P-value is the probability of observing a sample statistic as extreme as the test statistic. Since the test statistic is a chi-square, use the Chi-Square Distribution Calculator to assess the probability associated with the test statistic. Use the degrees of freedom computed above.  Interpret Results  If the sample findings are unlikely, given the null hypothesis, the researcher rejects the null hypothesis. Typically, this involves comparing the P-value to the significance level, and rejecting the null hypothesis when the P-value is less than the significance level.  Test Your Understanding of This Lesson  Problem  In a study of the television viewing habits of children, a developmental psychologist selects a random sample of 300 first graders - 100 boys and 200 girls. Each child is asked which of the following TV programs they like best: The Lone Ranger, Sesame Street, or The Simpsons. Results are shown in the contingency table below.  Viewing Preferences Row total
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved