1 Hypothesis testing & Chi-square COMM Nan Yu Fall 2007
2 Warming up Download “ChisquareData” to your desk top. Download Review Practice to your desk top. Double click to open the SPSS file Please complete the questions in the file of “Review Practice.” *Dataset was from Pew Research Center. Survey was conducted in Feb, 2007
3 Missing values How to define the “missing value” in SPSS ? Click here Select Discrete missing values. Enter the defined missing values.
4 From descriptive statistics to inferential statistic Inferential statistic provided answer to the question: Is what we have observed in the sample are true in the population (in reality)? How do we know?
5 First: Specifying the hypothesis to test Hypothesis: The attitude toward whether to keeping troops in Iraq or bring troops home would vary as a result of party affiliation (republican v. democrats).
6 Second: Levels of Measurement Are both IV and DV nominal? Chi-Square Test If Yes, 22
7 SPSS and Chi-Square Open Chi-Square Data Locate the variable “party” in the variable view of SPSS. Click the gray button in the column of “missing’ Define missing values “3, 4, 5, 9”
8 Descriptive Crosstabs Click Statistic: Choose Chi-square Click Cells: select column percentages Click OK
9 Crosstabulation We can observe a difference between republicans and democrats. What was this difference really happened in a great population or it was something only existing in this sample?
10 Chi-Square Chi-Square Value (test statistic) Degrees of Freedom Significance Level
11 Significant Level (p-value, or alpha level).000 level of significance means: 1.Probability that results happened by chance < Chance of being wrong < The probability that the results are a “fluke.”
12 Significant level (cont’) Three commonly-used accepted significant levels p <.05 (SPSS default) p <.01 p <.001 The smaller the p-value, the more significant the result is said to be. The smaller the p-values, the more unlikely the result have occurred by chance. If you want to make extra sure that you reject the null only when you’re very likely to be correct, do you chose a large or small accepted p-value?
13 Table example % of attitude toward plans for U.S. troops in Iraq RepublicanDemocrat Keep troops in Iraq78.60%24.10% Bring troops home21.40%75.90% 2 (1, N=862) = , p <.001.
14 Chart example
15 Interpret the result The chi-square test showed that the attitude toward whether to keeping troops in Iraq or bring troops home significantly varied as a result of party affiliation, 2 (1, N=862) = , p <.001. A significantly large percentage of Republicans (78.6%) thought the U.S. should keep the troops in Iraq, whereas a significantly large percentage of Democrats (75.9%) thought the country should bring the troops home. What we have proposed: The attitude toward whether to keeping troops in Iraq or bring troops home would vary as a result of party affiliation (republican v. democrat).
16 Hypothesis and Null Hypothesis H1: The attitude toward whether to keeping troops in Iraq or bring troops home would vary as a result of party affiliation (republican v. democrat). (We want to detect a difference here.) Null: The attitude toward whether to keeping troops in Iraq or bring troops home would NOT vary as a result of party affiliation (republican v. democrat). (We don’t want to detect a difference here)
17 Reject the null The general goal of inferential statistical analysis is to REJECT THE NULL = Reject that there is no relationship between two variables
18 Type I Error (α error) When researchers successful reject the null, but if fact they should not. When researchers claims that there is a relationship between two variables but actually it doesn’t exists in reality. Plainly speaking, it occurs when we are observing a difference when in truth there is none.
19 Type I Error Example: Researcher found that Freshmen skip more classes than older students.” Reality: Freshmen don’t skip more classes.
20 Turn to page 336 of the text The larger the sample size, the smaller the chance of committing Type I error.
21 Probability of Committing a Type I error What’s the probability of committing a Type I error? The significance level (alpha risk, p value). If accepted p-value is.05, chances are 5 in 100 of committing a Type 1 error.
22 Type II Error When researchers failed to reject the null, but if fact they should. When researchers claims that there is no relationship between two variables but actually it does exist. Plainly speaking, it occurs when we are NOT observing a difference when in truth there is a different.
23 Type II error (β errors) Example Researcher found that diet is not related to heart disease. Reality: Diet is related to heart disease.
24
25 Reality What Researcher Does Rejects the Null Not Reject the Null Reject the Null Not Reject the Null X X Type I Error Type II Error
26 Revisit the crosstabulation We can observe a difference between republicans and democrats.
27 Revisit the Chi-square test Chi-Square Value (test statistic) Degrees of Freedom Significance Level N 2 (1, N=862) = , p <.001. We have successfully rejected the null because 1) data are consistent with predictions, and if 2) obtained p value less than accepted significance level Note: we always need test statistic, df, N to determine the significance level
28 Formula to calculator Chi-square 2 = (O - E) E 2 Observed value Expected value
29 Number of Scores Free to Vary (How many boxes do I have to fill in before you can fill in the rest?) Degree of freedom Republican Democrat Keep troop in Iraq Bring troops home 100 Total
How many boxes do I have to fill in before you can fill in the rest? 5 5 For an R x K Chi-Square DF= (rows-1) x (columns-1) (3-1) X (2-1) =2 Total
31 Chi-Square practice 1 Use the data set of “ChisquareData” Test the hypothesis: The attitude toward George W. Bush (q1) would vary as a result of party affiliation (party).
32 Report your findings for What is the percentage of republicans who approve the way Bush is handling his job as president? What is the percentage of Democrats who disapprove the way Bush is handling his job as president? Report the chi-square test statistics, degree of freedom, valid N, and significant level in a proper format. Can we reject the null for this hypothesis?
33 Chi-Square practice 2 Use the data set of “ChisquareData” to test the hypothesis: The attitude toward War in Iraq (q37) would vary as a result of whether or not people believe in Christianity (chr).
34 Report your findings for What is the percentage of Christian who think U.S. made a wrong decision in using military force against Iraq? What is the percentage of people who are not Christian and also think U.S. made a wrong decision in using military force against Iraq? Report the chi-square test statistics, degree of freedom, valid N, and significant level in a proper format. Can we reject the null for this hypothesis?
35 Answers to practice 1 What is the percentage of republicans who approve the way Bush is handling his job as president? 80.3% What is the percentage of Democrats who disapprove the way Bush is handling his job as president? 90.6% Report the chi-square test statistics, degree of freedom, valid N, and significant level in a proper format. 2 (1, N=841) = , p <.001. Can we reject the null for this hypothesis? Yes, the null can be reject at the.001 significant level.
36 Answers to practice 2 What is the percentage of Christian who think U.S. made a wrong decision in using military force against Iraq? 57.1% What is the percentage of people who are not Christian and also think U.S. made a wrong decision in using military force against Iraq? 89.7% Report the chi-square test statistics, degree of freedom, valid N, and significant level in a proper format. 2 (1, N=71) = 8.71, p <.01. Can we reject the null for this hypothesis? Yes, we can reject the null at the.01 significant level.