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

Inference for Categorical Variable: More about Hypothesis Tests | STAT 0200, Study notes of Statistics

Material Type: Notes; Class: BASIC APPLIED STATISTICS; Subject: Statistics; University: University of Pittsburgh; Term: Spring 2007;

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-216
koofers-user-216 🇺🇸

10 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
(C) 2007 Nancy Pfenning
Elementary Statistics: Looking at the Big Picture 1
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture
Lecture 23
Inference for Categorical Variable:
More About Hypothesis Tests
Examples of Tests with 3 Forms of Alternative
How Form of Alternativ e Affects Test
When P-Value is “Small ”: Statistical Significance
Hypothesis Tests in Lo ng-Run
Relating Test Results t o Confidence Interval
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23.2
Looking Back: Review
4 Stages of Statistics
Data Production (discussed in Lectures 1-4)
Displaying and Summarizing (Lectures 5-12)
Probability (discussed in Lectures 13-20)
Statistical Inference
1 categorical: confidence intervals, hypothesis test s
1 quantitative
categorical and quantitati ve
2 categorical
2 quantitative
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23.3
Three Types of Inference Problem (Review)
In a sample of 446 students, 0.55 ate breakfast.
1. What is our best guess for the proportion of all
students who eat breakfast?
Point Estimate
2. What interval should contain the proportion of
all students who eat breakfast?
Confidence Interval
3. Do more than half (50%) of all students eat
breakfast?
Hypothesis Test
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23.4
Hypothesis Test About p (Review)
State null and alternative hypotheses and :
Null is “status quo”, alternative “rocks the boat”.
1. Consider sampling and study design.
2. Summarize with , standardize to z, assuming
that is true; consider if z is “large”.
3. Find P-value=prob.of z this far above/below/away
from 0; consider if it is “small”.
4. Based on size of P-value, choose or .
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Inference for Categorical Variable: More about Hypothesis Tests | STAT 0200 and more Study notes Statistics in PDF only on Docsity!

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture

Lecture 23

Inference for Categorical Variable:

More About Hypothesis Tests

Examples of Tests with 3 Forms of Alternative How Form of Alternative Affects Test When P -Value is “Small”: Statistical Significance Hypothesis Tests in Long-Run Relating Test Results to Confidence Interval (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 2

Looking Back: Review

4 Stages of Statistics  Data Production (discussed in Lectures 1-4)  Displaying and Summarizing (Lectures 5-12)  Probability (discussed in Lectures 13-20)  Statistical Inference  1 categorical: confidence intervals, hypothesis tests  1 quantitative  categorical and quantitative  2 categorical  2 quantitative (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 3

Three Types of Inference Problem (Review)

In a sample of 446 students, 0.55 ate breakfast.

  1. What is our best guess for the proportion of all students who eat breakfast? Point Estimate
  2. What interval should contain the proportion of all students who eat breakfast? Confidence Interval
  3. Do more than half (50%) of all students eat breakfast? Hypothesis Test (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 4

Hypothesis Test About p (Review)

State null and alternative hypotheses and : Null is “status quo”, alternative “rocks the boat”.

  1. Consider sampling and study design.
  2. Summarize with , standardize to z , assuming that is true; consider if z is “large”.
  3. Find P -value=prob.of z this far above/below/away from 0; consider if it is “small”.
  4. Based on size of P -value, choose or.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 5

Checking Sample Size: C.I. vs. Test

 Confidence Interval: Require observed counts

in and out of category of interest to be at least

 Hypothesis Test: Require expected counts in

and out of category of interest to be at least 10

(assume p = ).

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 6

Example: Checking Sample Size in Test

Background : 30/400=0.075 students picked #7 “at random” from 1 to 20. Want to test : p =0.05 vs.

. : p >0.05.  Question: Is n large enough to justify finding P -value based on normal probabilities? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 8

Example: Checking Sample Size in Test

Background : 30/400=0.075 students picked #7 “at random” from 1 to 20. Want to test : p =0.05 vs.

. : p >0.05.  Response: n = n (1- )=

Looking Back: For confidence interval, checked

30 and 370 both at least 10. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 9

Example: Test with “>” Alternative (Review)

Note : Step 1 requires 3 checks:  Is sample unbiased? (Sample proportion has mean 0.05?)  Is population ≥ 10 n? (Formula for s.d. correct?)  Are np o and n (1- p o) both at least 10? (Find or estimate P -value based on normal probabilities?)

  1. Students are “typical” humans; bias is issue at hand.
  2. If p =0.05, sd of is and 3. P -value = is small: just over 0.
  3. Reject , conclude Ha: picks were biased for #7.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 17

Example: Test with “Not Equal” Alternative

Background : 43% of Florida’s community college students are disadvantaged.  Response: First write :_____ vs. : _____

  1. 356(0.43), 356(1-0.43) both≥10; pop.≥10(356)
  2. =____, z =_____ 3. P -value = ________________________
  3. Reject? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 19

Example: Test with “Not Equal” Alternative

Note: P -value is a two-tailed probability because alternative was “not equal” (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 20

90-95-98-99 Rule: “Outside” Probabilities

1.70 just over 1.645   P-value just under 2(.05)  (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 21

One-sided or Two-sided Alternative

 Form of alternative hypothesis impacts

P -value

 P -value is the deciding factor in test

 Alternative should be based on what

researchers hope/fear/suspect is true

before “snooping” at the data

 If < or > is not obvious, use two-sided

alternative (more conservative)

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 23

Example: How Form of Alternative Affects Test

Background : 43% of Florida’s community college students are disadvantaged.  Question: Is % disadvantaged at Florida Keys (169/356=47.5%) unusually high? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 25

Example: How Form of Alternative Affects Test

Background : 43% of Florida’s community college students are disadvantaged.  Response: Now write :______ vs. :_______

  1. Same checks of data production as before.
  2. Same =0.475, z =+1.70.
  3. Now P -value=_____________________________
  4. Reject? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 26

P -value for One- or Two-Sided Alternative

 P -value for one-sided alternative is half

P -value for two-sided alternative.

 P -value for two-sided alternative is twice

P -value for one-sided alternative.

For this reason, two-sided alternative is more

conservative (larger P -value, harder to

reject Ho).

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 27

Thinking About Data

Before getting caught up in details of test,

consider evidence at hand.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 33

Example: Reviewing P-values and Conclusions

Background : Consider our prototypical examples:  Are random number selections biased? P -value=0.  Do fewer than half of commuters walk? P -value=0.  Is % disadvantaged significantly different? P -value=0.  Is % disadvantaged significantly higher? P -value=0.  Question: What conclusions did we draw, based on those P -values? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 35

Example: Reviewing P-values and Conclusions

Background : Consider our prototypical examples:  Are random number selections biased? P -value=0.  Do fewer than half of commuters walk? P -value=0.  Is % disadvantaged significantly different? P -value=0.  Is % disadvantaged significantly higher? P -value=0.  Response: (Consistent with 0.05 as cut-off )  P -value=0.011Reject? ___  P -value=0.299 Reject? ___  P -value=0.088Reject? ___  P -value=0.044Reject? ___ (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 36

Example: Cut-Offs for “Small” P-Value

 Background : Bookstore chain will open new

store in a city if there’s evidence that its

proportion of college grads is higher than

0.26, the national rate.

 Question: Choose cut-off (0.10, 0.05, 0.01):

 if no other info is provided  if chain is enjoying considerable profits; owners are eager to pursue new ventures  if chain is in financial difficulties, can’t afford losses if unsuccessful due to too few grads (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 38

Example: Cut-Offs for “Small” P-Value

 Response: Choose cut-off (0.10, 0.05, 0.01):

 if no other info is provided:  use ___  if chain is enjoying considerable profits; owners are eager to pursue new ventures:  use ___  if chain is in financial difficulties, can’t afford loss if unsuccessful due to too few grads:  use ___

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 39

Definition

Statistically significant data: produce P -value small enough to reject. z plays a role: Reject if P -value small; if | z | large; if…  Sample proportion far from  Sample size n large  Standard deviation small (if is close to 0 or 1) (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 40

Role of Sample Size n

 Large n : may reject even though

observed proportion isn’t very far from ,

from a practical standpoint.

Very small P -valuestrong evidence against

Ho but p not necessarily very far from p o.

 Small n : may fail to reject even though

it is false.

Failing to reject false Ho is 2nd^ type of error

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 41

Definition

 Type I Error: reject null hypothesis even

though it is true (false positive)

 Probability is cut-off

 Type II Error: fail to reject null

hypothesis even though it’s false

(false negative)

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 42

Hypothesis Test and Long-Run Behavior

Repeatedly carry out hypothesis tests of p =0.5,

based on 20 coinflips, using cut-off 5%.

In the long run, 5% of the tests will reject

. : p =0.5, even though it’s true.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 48

Example: C.I. Results, Based on Test

 Background : A hypothesis test did not reject

. : p =0.5 in favor of the alternative : p <0.5.

 Question: Do we expect 0.5 to be contained

in a confidence interval for p?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L23. 50

Example: C.I. Results, Based on Test

 Background : A hypothesis test did not reject

. : p =0.5 in favor of the alternative : p <0.5.

 Response:

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L19. 51

Lecture Summary

(More Hypothesis Tests for Proportions)

 Examples with 3 forms of alternative hypothesis  Form of alternative hypothesis  Effect on test results  When data render formal test unnecessary  P -value for 1-sided vs. 2-sided alternative  Cut-off for “small” P -value  Statistical significance; role of n , Type I or II Error  Hypothesis tests in long-run  Relating tests and confidence intervals