Download presentation
Presentation is loading. Please wait.
1
Hypothesis Testing Review
χ2 & GAMMA
2
Example: Men and Women and support for Gun Control
H0 : No difference between men and women in support for gun control. H1 : Men are not equal to women , men could be more or less supportive, at one tail of the distribution or the other. H2: Men > Women; men more favorable than women H3: Men < Women; men less favorable.
4
Compute the Critical Ratio Test
Note the similarities between this t score and the t score we used to compute confidence intervals for means
5
Make a Decision State Results
Determine which is greater– the t score from the table or the t score from your sample computations If the t from your sample is greater than the t* from the table, you are significant at the level of α (risk) chosen State Results State results in terms of the Null Hypothesis If t* < t, we can reject the null hypothesis If t* > t, we fail to reject the null
6
Example: Are Conservative parents more strict with their children than liberal parents? A study surveyed 25 Liberal parents and 25 Conservative parents. Parents were rated on a scale from 1 (strict) to 100 (permissive) . Liberal parents had a mean permissiveness score of 60 with a std. dev. of 12. Conservative Parents have a mean score of 49 with a std. dev. of 14. Liberal Conservative X1 = 60 X2 = 49 s1 = 12 s2 = 14 N1 = 25 N2 = 35
7
Decision making steps Step 1: State Hypothesis. What is the null?
The null hypothesis is Liberal and Conservative parents are not different. What is the Alternative? The null hypothesis is Liberal Parents are more permissive (t* < t) Step 2: Determine Distribution. When comparing Sample Means, use t distribution (normal distribution for difference of means).
8
Step 3: Determine Critical Value For the Distribution
Step 3: Determine Critical Value For the Distribution. Set critical value t* at 95%, alpha = 5%. Step 4: Compute the Critical Ratio Test. To test the difference between the sample mean and the null hypothesis we first compute the deviation by the standard error of the sample mean.
9
Step 4 Continued: (Compute)
10
Step 5: Make Decision- Recall Ha was t* < t (one-tailed) with df = n1 + n2 - 2 = 60 – 2 58 at .05 level Computed t was 3.12 t* from t-table at .05 is 1.671 Step 6: State Conclusion 1.671 < 3.12 Therefore, we can reject the null hypothesis that liberals and conservatives are equally permissive, since t-value of 3.12 is greater than the critical value of t of 1.68
11
CHI SQUARE (χ2)
12
Why Chi ? (χ2) We want to compare two variables, but…
Not all variables are interval-level, so we cannot use regression. Hypothesis Tests for Difference of Means and Difference of Proportions only allow us to compare two groups with one value. We need something else. . .
13
Imagine a a bag that contained 90 white marbles and 10 black marbles.
If you drew 10 marbles, how many would you expect to come up white, and how many black? We expect 9 white marbles and 1 black. But there is some probability that we will get 8/2 and some probability we will get 7/3 …
14
What do we do? Expected Observed White 9 ??? Black 1
We can compare what we would expect by chance to what we actually observed. We can make a probabilistic statement about the chances of observing what we did based on our expectations. Finally, we test the hypothesis that there is no real difference between what we observed and what we expected (using the 6 steps of hypothesis testing. Expected Observed White 9 ??? Black 1
15
Basic Assumption of the Null Hypothesis
There is no difference in the population, the difference you observe is just the chance variation of your sample. We are comparing observed values (“frequency actually observed in our sample, written “fo”) to some set of expected by chance frequencies (written “fe”). The expected values being chance – with the null hypothesis holding that the difference between fo minus fe is really zero and the observed vs. expected difference is due to sampling error.
16
Chi Square (χ2) The test statistic for testing hypothesis comparing 2 or more nominal categories The Chi Square Statistic compares nominal values in a cross-tabulation table, making what are called row by column comparisons or “r x c” tables. A Nominal variable … … is a categorical variable with mutually exclusive categories. For example gender where male = 1 and female = 2.
17
Approval for President Clinton by Race
BLACKS WHITES APPROVE 69 156 DISAPPROVE 21 144
18
The formula for c2 is: OR, sometimes written: Where fo is the observed frequency of each category in each cell of a table.
19
O or fo is what we observe from our sample, the observed frequency
O or fo is what we observe from our sample, the observed frequency. NOTE that c2 works with frequencies in each cell. E or fe is the expected frequency, the number of people who would show up in each cell IF the null hypothesis were true, if there was no racial difference in approval, if the frequencies were due solely to chance.
20
For each cell in the table we compare what we observe to what we expect by chance:
Subtract the value of the hypothetical expectancy (fe) from the observed frequency (fo) for each cell. Square each of these deviations. Divide each of the squared differences by the expected value of each cell. Finally, take the sum of the squared fo- f e differences to get χ2 .
21
The Chi Square statistic tests :
Whether the difference between what you observe and what chance would predict is due to sampling error. The greater the deviation of what we observe to what we would expect by chance, the greater the probability that the difference is NOT due to chance.
22
Testing for a Gender Effect for Approval of Clinton
Women Men Row Marginal Oppose Approve Column Marginal
23
Hypothesis Testing Step 1: State Hypothesis What is the Null?
What is the Alternative (Research) Hypothesis?
24
Frequency Table: Approval for Clinton by Gender
Women Men Row Total Disapprove 131 204 335 Approve 287 286 573 Column Total 418 490 908
25
FIRST STEP: COMPUTE PERCENTAGE TABLE
Row margins: 335/908 = 36.9% Disapprove 573/908 = 63.1% Approve NOTE: Most Citizens Approve of Clinton BUT: We Are Testing for a Gender Effect: Are Women more Supportive Than Men?
26
PERCENTAGIZE TABLE Women Men Row Marginal Disapprove 131/418 => 31%
204/490 => 42% 335/908 => 37% Approve 287/418 => 69% 286/490 => 58% 573/908 => 63% Column Marginal 418 => 100% 490 => 908 =>
27
INTERPRETATION Row Marginal: Most Citizens (63%) Approved of Clinton.
Column Marginal: There Are More Men in the Sample (54%). Based on the percent table looks like women are more supportive of Clinton than are men – 69% vs. 58%. Step #1: Hypotheses: Null Hypothesis: H0: Women – Men = 0 + Chance Cell Percents Show Women More Supportive Null Hypothesis Challenged.
28
STEP # 2: WHAT IS THE DISTRIBUTION?
Categorizing same individuals in two ways: Approval and Gender Looking at the Effect of an Independent Variable (Gender) on Dependent Variable (Approval). This is a classic application for the c2 test. · 1. We have nominal data in both variables - men vs women, approve vs disapprove. · 2. The data are in the form of frequencies and · 3. We are looking to see if there is an relationship between the two variables.
29
STEP 4: DETERMINE CRITICAL VALUE OF 2*
Step 3: DETERMINE LEVEL OF SIGNIFICANCE We set as our standard 95% confidence that the difference we observe in our study is not due to chance This is equivalent of setting alpha at risk level of 5% (=.05) for 95% confidence. STEP 4: DETERMINE CRITICAL VALUE OF 2* Degrees of Freedom: (# rows – 1) * (# Columns – 1) Here: (2 – 1) * (2 – 1) = 1 * 1 = 1 Look up Critical Value of 2* at 5% risk with 1 df and find: 2* = 3.84
30
CHI-SQUARE DISTRIBUTION
31
STEP 5: MAKE DECISION Question: Is the proportion of men and women approving Clinton different from what you would expect by sampling error in more than 5% of all samples? Assuming the null hypothesis is true what would be the expected values? What we need now are the expected values against which to compare our observed values. What would you expect by assuming the null is true?
32
CALCULATING EXPECTED VALUES
Look at the Marginal Values: Note: 63% of all respondents approve Therefore, assuming the null is true — that there is no gender difference — what would you expect the cell percentages to look like? 37% of women should disapprove as well as 37% of men, + sampling error 63% of women as well as 63% of men should approve, + sampling error The proportions of men and women approving and disapproving should be the same + sampling error
33
CONSTRUCT A “NULL” TABLE of fe Values
WOMEN MEN TOTALS & PERCENT Disapprove N = 335 36.9% Approve N = 573 63.1% N = 418 N = 490 N = 908 100%
34
TWO METHODS FOR COMPUTING EXPECTED VALUES
Method (Easiest): Row Margin * Column Margin Total N Cell a: 335 * 418 / 908 = 140,030 / 908 = 154 Cell b: 335 * 490 / 908 = 164,150 / 908 = 181 Cell c: 573 * 418 / 908 = 239,514 / 908 = 264 Cell d: 573 * 490 / 908 = 280,770 / 908 = 309
35
2. Null Percentage Method: If null is true, the Percentage of Men and Women should be the same. Then compute the frequency based on that percentage. Purely for Mathematical Completeness Cell a: .369 * 418 = 154 Cell b: .369 * 490 = 181 Cell c: .631 * 418 = 264 Cell d: .631 * 490 = 309
36
CHI-SQUARE: Frequency Observed & (Expected)
WOMEN MEN Disapprove 131 (154) 204 (181) 335 Approve 287 (264) 286 (309) 573 418 490 908
37
KEY QUESTIONS How closely do fo values match fe values?
Do the squared fo – fe differences fit the null hypothesis? Or, are the differences between observations and chance expectations so deviant as to justify rejection of the null?
38
CALCULATE CHI-SQUARE CELL fo fe (fo-fe) (fo -fe)2 (fo-fe)2 /fe A 131
154 -23 529 3.44 B 204 181 23 2.92 C 287 264 2.00 D 286 309 1.71 = 10.07
39
Compare Chi-Square Values:
Look in table for alpha at .05 with 1 df Critical value: 3.84 Chi-square computed from data: 10.07 STEP 6: STATE CONCLUSION Computed value of chi-square greater than critical value, therefore, reject the null hypothesis. Substantive interpretation?: The difference between groups on the IV is statistically different from the null hypothesis.
40
Summing up the properties of the c2 Distribution:
c2 distribution ranges from zero to some positive value, i.e., ‘no difference’ to some ‘big difference’. c2 distribution is not symmetrical, but skewed to the right, from zero to a large positive c2. Chi square looks at differences from zero. Its value depends on the number of comparisons made, that is, the number of df. Note that the critical value of chi square gets bigger as the df get bigger, just because the more comparisons made the more likely you are to find differences, so df corrects for this. There are many different c2 distributions. Like the t distribution, c2 varies with degrees of freedom.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.