Hypothesis Testing Review

Slides:



Advertisements
Similar presentations
STATISTICAL ANALYSIS. Your introduction to statistics should not be like drinking water from a fire hose!!
Advertisements

CHI-SQUARE(X2) DISTRIBUTION
Hypothesis Testing IV Chi Square.
Chapter 13: The Chi-Square Test
Analysis of frequency counts with Chi square
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
Inferential Statistics  Hypothesis testing (relationship between 2 or more variables)  We want to make inferences from a sample to a population.  A.
Crosstabs and Chi Squares Computer Applications in Psychology.
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Hypothesis Testing IV (Chi Square)
AM Recitation 2/10/11.
1 Psych 5500/6500 Chi-Square (Part Two) Test for Association Fall, 2008.
1 Tests with two+ groups We have examined tests of means for a single group, and for a difference if we have a matched sample (as in husbands and wives)
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.
Week 10 Chapter 10 - Hypothesis Testing III : The Analysis of Variance
Chi-Square as a Statistical Test Chi-square test: an inferential statistics technique designed to test for significant relationships between two variables.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Copyright © 2012 by Nelson Education Limited. Chapter 10 Hypothesis Testing IV: Chi Square 10-1.
Quantitative Methods Partly based on materials by Sherry O’Sullivan Part 3 Chi - Squared Statistic.
Chapter 12 A Primer for Inferential Statistics What Does Statistically Significant Mean? It’s the probability that an observed difference or association.
Chi-Square X 2. Parking lot exercise Graph the distribution of car values for each parking lot Fill in the frequency and percentage tables.
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
Learning Objectives Copyright © 2002 South-Western/Thomson Learning Statistical Testing of Differences CHAPTER fifteen.
Testing Differences between Means, continued Statistics for Political Science Levin and Fox Chapter Seven.
Nonparametric Tests of Significance Statistics for Political Science Levin and Fox Chapter Nine Part One.
Chapter Outline Goodness of Fit test Test of Independence.
Chapter 11: Chi-Square  Chi-Square as a Statistical Test  Statistical Independence  Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Week 13a Making Inferences, Part III t and chi-square tests.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
I. ANOVA revisited & reviewed
Introduction to Marketing Research
Cross Tabulation with Chi Square
Basic Statistics The Chi Square Test of Independence.
The Chi-square Statistic
Chi-square test.
Lecture #8 Thursday, September 15, 2016 Textbook: Section 4.4
Hypothesis Testing Hypothesis testing is an inferential process
Chi-Square (Association between categorical variables)
Chapter 9: Non-parametric Tests
Presentation 12 Chi-Square test.
Lecture Nine - Twelve Tests of Significance.
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Chapter 11 Chi-Square Tests.
Community &family medicine
Qualitative data – tests of association
Hypothesis Testing Using the Chi Square (χ2) Distribution
Inferential Statistics
The Chi-Square Distribution and Test for Independence
Is a persons’ size related to if they were bullied
Consider this table: The Χ2 Test of Independence
Reasoning in Psychology Using Statistics
Exam 5 Review GOVT 201.
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables (cross tabs)
Contingency Tables: Independence and Homogeneity
Chapter 11 Chi-Square Tests.
Inference on Categorical Data
Analyzing the Association Between Categorical Variables
Reasoning in Psychology Using Statistics
Parametric versus Nonparametric (Chi-square)
Reasoning in Psychology Using Statistics
UNIT V CHISQUARE DISTRIBUTION
S.M.JOSHI COLLEGE, HADAPSAR
Chapter Outline Goodness of Fit test Test of Independence.
CLASS 6 CLASS 7 Tutorial 2 (EXCEL version)
Chapter 11 Chi-Square Tests.
Contingency Tables (cross tabs)
CHI SQUARE (χ2) Dangerous Curves Ahead!.
Presentation transcript:

Hypothesis Testing Review χ2 & GAMMA

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.

Compute the Critical Ratio Test Note the similarities between this t score and the t score we used to compute confidence intervals for means

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

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

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).

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.

Step 4 Continued: (Compute)

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

CHI SQUARE (χ2)

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. . .

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 …

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

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.

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.

Approval for President Clinton by Race BLACKS WHITES APPROVE 69 156 DISAPPROVE 21 144

The formula for c2 is: OR, sometimes written: Where fo is the observed frequency of each category in each cell of a table.

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.

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 .

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.

Testing for a Gender Effect for Approval of Clinton Women Men Row Marginal Oppose Approve Column Marginal

Hypothesis Testing Step 1: State Hypothesis What is the Null? What is the Alternative (Research) Hypothesis?

Frequency Table: Approval for Clinton by Gender Women Men Row Total Disapprove 131 204 335 Approve 287 286 573 Column Total 418 490 908

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?

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 =>

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.

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.

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

CHI-SQUARE DISTRIBUTION

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?

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

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%

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

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

CHI-SQUARE: Frequency Observed & (Expected) WOMEN MEN Disapprove 131 (154) 204 (181) 335 Approve 287 (264) 286 (309) 573 418 490 908

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?

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

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.

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.