Download Hypothesis Testing and Comparing Two Proportions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Hypothesis Testing and
Comparing Two Proportions
• Hypothesis Testing: Deciding whether your
data shows a “real” effect, or could have
happened by chance
• Hypothesis testing is used to decide
between two possibilities:
– The Research Hypothesis
– The Null Hypothesis
H1 and H0
• H1: The Research Hypothesis
– The effect observed in the data (the sample)
reflects a “real” effect (in the population)
• H0: The Null Hypothesis
– There is no “real” effect (in the population)
– The effect observed in the data (the sample) is
just due to chance (sampling error)
Example: Comparing
Proportions
• H0: The proportions are not really different
• H1: The proportions are really different
• Example 1: Are pennies heavier on one
side?
• Example 2: Do males mention footware in
personals ads more often than females do?
The Logic of Hypothesis Testing
1. Assume the Null Hypothesis (H0) is true
2. Calculate the probability (p) of getting the
results observed in your data if the Null
Hypothesis were true
3. If that probability is low (< .05) then reject
the Null Hypothesis
4. If you reject the Null Hypothesis, that
leaves only the Research Hypothesis (H1)
1. Assume the Null Hypothesis is true
– The coins are fair (balanced)
2. Calculate the probability (p) of getting the results
observed in your data if the Null Hypothesis
were true
– How often would you get 8/10 coins coming up heads
if the coins were fair? You would get 8/10 heads less
than 5% of the time.
3. If that probability is low (< .05) then reject the
Null Hypothesis
– That is unlikely, so the Null Hypothesis must be false.
4. If you reject the Null Hypothesis, that leaves
only the Research Hypothesis
– We conclude that the coins are not fair (balanced).
Calculating p
•
•
How do you calculate the probability that
the observed effect would happen by
chance if the null hypothesis were true?
Use a test statistic:
1. Are two proportions different? Chi-square
2. Are two means different? t-test
3. Are more than two means different? ANOVA
or “F-test”
The Logic is Always the Same:
1. Assume nothing is going on (assume H0)
2. Calculate a test statistic (Chi-square, t, F)
3. How often would you get a value this
large for the test statistic when H0 is true?
(In other words, calculate p)
4. If p < .05, reject the null hypothesis and
conclude that something is going on (H1)
5. If p > .05, do not conclude anything.
Demonstrating Hypothesis
Testing with Chi-square
• Example 1: Testing whether coins are
unbalanced
• Example 2: Testing whether men are more
likely to mention footware in personals ads
than women are.
• (see Excel spreadsheet for both examples)
Assumptions of Chi-square Test
• Each observation must be INDEPENDENT
– one data point per subject
• DV is categorical (often yes/no)
• Calculations must be made from COUNTS,
not proportions or percentages
• No cell should have an “expected value” of
less than 5
Using Chi-square in SPSS to
compare two proportions
• Setting up the data file – copy data from
excel and paste it into SPSS data file
• Performing the Chi-square test (next slide)
• Interpreting the Results (separate slide)
• Reporting the Results (separate slide)
Performing the Chi-Square Test
1. Name the variables using the variables tab in the SPSS
data window
2. analyze -> descriptive statistics -> crosstabs
3. Use arrow button to move “gender” into “rows” box
4. Use arrow button to move “footware” into “columns”
box
5. Click “Statistics” box
6. Check the box for “Chi-square”, then click “Continue”
7. Click the “Cells” box.
8. Under “Percentages” check the boxes for “Row” and
“Column”
9. Click “OK”
Interpreting the Results
• “Case Processing Summary” – look for missing data,
etc.
• “Gender x Footware Crosstabulation” – shows the
counts of observations in each cell, and the percentages
within each row and within each column.
• “Chi-square Tests” – look at “Pearson chi-square” line
– Value = 5.33 – This is the value of Chi-square
– “Asymp Sig” = .021 – This is the p value
– Compare these values to those I calculated by hand on
the excel spreadsheet
Reporting the Results
• Report the value of chi-square, the degrees of
freedom (df), and the p value. Also mention how
many observations there were.
• EXAMPLE: “A greater proportion of men than
women mentioned footware in their ads (see Table
1). Of the six ads placed by men, 83% mentioned
footware. Only 17% of the six ads placed by
women mentioned footware. This difference was
significant by a Chi-square test, Chi-square (1) =
5.3, p < .05.”
Related documents