Stat 31, Section 1, Last Time Choice of sample size

Slides:



Advertisements
Similar presentations
QM Spring 2002 Business Statistics Introduction to Inference: Hypothesis Testing.
Advertisements

Evaluating Hypotheses Chapter 9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics.
Evaluating Hypotheses Chapter 9 Homework: 1-9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics ~
Chapter 9 Hypothesis Testing.
Ch. 9 Fundamental of Hypothesis Testing
PSY 307 – Statistics for the Behavioral Sciences
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Statistical Techniques I
Section 9.1 Introduction to Statistical Tests 9.1 / 1 Hypothesis testing is used to make decisions concerning the value of a parameter.
14. Introduction to inference
Stat 31, Section 1, Last Time T distribution –For unknown, replace with –Compute with TDIST & TINV (different!) Paired Samples –Similar to above, work.
1 Today Null and alternative hypotheses 1- and 2-tailed tests Regions of rejection Sampling distributions The Central Limit Theorem Standard errors z-tests.
Stat 31, Section 1, Last Time Statistical Inference Confidence Intervals: –Range of Values to reflect uncertainty –Bracket true value in 95% of repetitions.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
Confidence intervals are one of the two most common types of statistical inference. Use a confidence interval when your goal is to estimate a population.
1 Chapter 10: Introduction to Inference. 2 Inference Inference is the statistical process by which we use information collected from a sample to infer.
Stat 155, Section 2, Last Time Binomial Distribution –Normal Approximation –Continuity Correction –Proportions (different scale from “counts”) Distribution.
Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test.
S-012 Testing statistical hypotheses The CI approach The NHST approach.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Last Time Binomial Distribution Political Polls Hypothesis Testing
Math 3680 Lecture #13 Hypothesis Testing: The z Test.
Stat 31, Section 1, Last Time Distribution of Sample Means –Expected Value  same –Variance  less, Law of Averages, I –Dist’n  Normal, Law of Averages,
Uncertainty and confidence Although the sample mean,, is a unique number for any particular sample, if you pick a different sample you will probably get.
Review of Hypothesis Testing: –see Figures 7.3 & 7.4 on page 239 for an important issue in testing the hypothesis that  =20. There are two types of error.
+ Homework 9.1:1-8, 21 & 22 Reading Guide 9.2 Section 9.1 Significance Tests: The Basics.
Chapter Nine Hypothesis Testing.
Module 10 Hypothesis Tests for One Population Mean
Lecture #8 Thursday, September 15, 2016 Textbook: Section 4.4
Statistical Inference
CHAPTER 9 Testing a Claim
What Is a Test of Significance?
Chapter 9: Testing a Claim
Unit 5: Hypothesis Testing
CHAPTER 9 Testing a Claim
Warm Up Check your understanding p. 541
Hypothesis Testing and Confidence Intervals (Part 1): Using the Standard Normal Lecture 8 Justin Kern October 10 and 12, 2017.
CHAPTER 9 Testing a Claim
Hypothesis Testing Is It Significant?.
Hypothesis Testing: Hypotheses
Hypothesis Tests for a Population Mean,
Chapter 9 Hypothesis Testing.
CHAPTER 9 Testing a Claim
LESSON 20: HYPOTHESIS TESTING
Chapter Nine Part 1 (Sections 9.1 & 9.2) Hypothesis Testing
Essential Statistics Introduction to Inference
YOU HAVE REACHED THE FINAL OBJECTIVE OF THE COURSE
CHAPTER 9 Testing a Claim
Significance Tests: The Basics
Section 9.1 Significance Tests: The Basics
Chapter 10: Estimating with Confidence
Significance Tests: The Basics
CHAPTER 9 Testing a Claim
Basic Practice of Statistics - 3rd Edition Introduction to Inference
Chapter 8: Estimating with Confidence
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Chapter 8: Estimating with Confidence
Testing Hypotheses I Lesson 9.
Chapter 9: Significance Testing
Chapter 8: Estimating with Confidence
AP STATISTICS LESSON 10 – 4 (DAY 2)
CHAPTER 9 Testing a Claim
Section 11.1: Significance Tests: Basics
Chapter 8: Estimating with Confidence
Statistical Test A test of significance is a formal procedure for comparing observed data with a claim (also called a hypothesis) whose truth we want to.
CHAPTER 9 Testing a Claim
STA 291 Spring 2008 Lecture 17 Dustin Lueker.
Presentation transcript:

Stat 31, Section 1, Last Time Choice of sample size Choose n to get desired error Interpretation of Confidence Intervals Bracket true value in 95% of repetitions Hypothesis Testing Yes – No questions, under uncertainty

Hypothesis Tests E.g. A fast food chain currently brings in profits of $20,000 per store, per day. A new menu is proposed. Would it be more profitable? Test: Have 10 stores (randomly selected!) try the new menu, let = average of their daily profits.

Hypothesis Testing Note: Can never make a definite conclusion, Instead measure strength of evidence. Approach I: (note: different from text) Choose among 3 Hypotheses: H+: Strong evidence new menu is better H0: Evidence in inconclusive H-: Strong evidence new menu is worse

Fast Food Business Example Base decision on best guess: Will quantify strength of the evidence using probability distribution of E.g.  Choose H+  Choose H0  Choose H-

Fast Food Business Example How to draw line? (There are many ways, here is traditional approach) Insist that H+ (or H-) show strong evidence I.e. They get burden of proof (Note: one way of solving gray area problem)

Fast Food Business Example Suppose observe: , based on Note , but is this conclusive? or could this be due to natural sampling variation? (i.e. do we risk losing money from new menu?)

Fast Food Business Example Assess evidence for H+ by: H+ p-value = Area

Fast Food Business Example Computation in EXCEL: Class Example 22, Part 1: https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls P-value = 0.094 i.e. About 10% Is this “small”? (where do we draw the line?)

Fast Food Business Example View 1: Even under H0, just by chance, see values like , about 10% of the time, i.e. 1 in 10, so not “terribly convincing”??? Could be a “fluke”? But where is the boundary line?

P-value cutoffs View 2: Traditional (and even “legal”) cutoff, called here the yes-no cutoff: Say evidence is strong, when P-value < 0.05 Just an agreed upon value, but very widely used: Drug testing Publication of scientific papers

P-value cutoffs Say “results are statistically significant” when this happens, i.e. P-value < 0.05 Can change cutoff value 0.05, to some other level, often called Greek “alpha” E.g. your airplane safe to fly, want E.g. often called strongly significant

P-value cutoffs View 3: Personal idea about cutoff, called gray level (vs. yes-no above) P-value < 0.01: “quite strong evidence” 0.01 < P-value < 0.1: “weaker evidence but stronger for smaller P-val.” 0.1 < P-value: “very weak evidence, at best”

Fast Food Business Example P-value of 0.094 for H+, Is “quite weak evidence for H+”, i.e. “only a mild suggestion” This happens sometime: not enough information in data for firm conclusion

Fast Food Business Example Flip side: could also look at “strength of evidence for H-”. Expect: very weak, since saw Quantification: H- P-value = $20,000 $21,000

Fast Food Business Example EXCEL Computation: Class Example 22, part 1 https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls H- P-value = 0.906 >> ½, so no evidence at all for H- (makes sense)

Fast Food Business Example A practical issue: Since , May want to gather more data… Could prove new menu clearly better (since more data means more information, which could overcome uncertainty)

Fast Food Business Example Suppose this was done, i.e. n = 10 is replaced by n = 40, and got the same: Expect: 4 times the data  ½ of the SD Impact on P-value? Class Example 22, Part 2 https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls

Fast Food Business Example How did it get so small, with only ½ the SD? mean = $20,000, observed $21,000 P-value = 0.906 P-value = 0.004

Hypothesis Testing HW: C16 For each of the problems: A box label claims that on average boxes contain 40 oz. A random sample of 12 boxes shows on average 39 oz., with s = 2.2. Should we dispute the claim?

Hypothesis Testing We know from long experience that Farmer A’s pigs average 570 lbs. A sample of 16 pigs from Farmer B averages 590 lbs, with an SD of 110. Is it safe to say B’s pigs are heavier on average? Same as (b) except “lighter on average”. Same as (b) except that B’s average is 630 lbs.

Hypothesis Testing Do: Define the population mean of interest. Formulate H+, H0, and H-, in terms of mu. Give the P-values for both H+ and H-. (a. 0.942, 0.058, b. 0.234, 0.766, c. 0.234, 0.766, d. 0.015, 0.985) Give a yes-no answer to the questions. (a. H-  don’t dispute b. H-  not safe c. H-  not safe d. H-  safe)

Hypothesis Testing Give a gray level answer to the questions. (a. H-  moderate evidence against b. H-  no strong evidence c. H-  seems to go other way d. H-  strong evidence, almost very strong)

And now for something completely different…. An amazing movie clip: http://abfhm.free.fr/basket.htm Thanks to Trent Williamson

Hypothesis Testing Hypo Testing Approach II: 1-sided testing (more conventional & is version in text) Idea: only one of H+ and H- is usually relevant, so combine other with H0

Hypothesis Testing Approach II: New Hypotheses Null Hypothesis: H0 = “H0 or ” Alternate Hypothesis: HA = opposite of Note: common notation for HA is H1 Gets “burden of proof”, I might accidentally put this i.e. needs strong evidence to prove this

Hypothesis Testing Weird terminology: Firm conclusion is called “rejecting the null hypothesis” Basics of Test: P-value = Note: same as H0 in H+, H0, H- case, so really just same as above

Fast Food Business Example Recall: New menu more profitable??? Hypo testing setup: P-val = Same as before. See: Class Example 22, part 3: https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls

Hypothesis Testing HW: 6.45, 6.53 Interpret with both yes-no and gray level AlternateTerminology: “Significant at the 5% level” = = P-value < 0.05 “Test Statistic z” = N(0,1) cutoff

Hypothesis Testing 2-sided tests Hypo Testing Approach III: 2-sided tests Main idea: when either of H+ or H- is conclusive, then combine them E.g. Is population mean equal to a given value, or different? Note either bigger or smaller is strong evidence

Hypothesis Testing “Alternative Hypothesis” is: HA = “H+ or H-” Hypo Testing Approach III: “Alternative Hypothesis” is: HA = “H+ or H-” General form: Specified Value

Hypothesis Testing “Alternative Hypothesis” is: HA = “H+ or H-” Hypo Testing Approach III: “Alternative Hypothesis” is: HA = “H+ or H-” General form: Specified Value

Hypothesis Testing, III Note: “ ” always goes in HA, since cannot have “strong evidence of =”. i. e. cannot be sure about difference between and + 0.000001 while can have convincing evidence for “ ” (recall H0 gets “burden of proof”)

Hypothesis Testing, III Basis of test: (now see why this distribution form is used) observed value of “more conclusive” is the two tailed area

Fast Food Business Example Two Sided Viewpoint: $1,000 $1,000 P-value = $20,000 $21,000 mutually exclusive “or” rule

Fast Food Business Example P-value = =NORMDIST… See Class Example 22, part 4 https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls = 0.188 So no strong evidence, Either yes-no or gray-level

Fast Food Business Example Shortcut: by symmetry 2 tailed Area = 2 x Area See Class Example 22, part 4 https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls

Hypothesis Testing, III HW: 6.46 - interpret both yes-no & gray-level (0.0164, quite strong evidence, OK for non-normal, by Central Limit Theorem)

Hypothesis Testing, III A “paradox” of 2-sided testing: Can get strange conclusions Fast food example: suppose gathered more data, so n = 20, and other results are the same

Hypothesis Testing, III One-sided test of: P-value = … = 0.031 Part 5 of https://www.unc.edu/~marron/UNCstat31-2005/Stat31Eg22.xls Two-sided test of: P-value = … = 0.062

Hypothesis Testing, III Yes-no interpretation: Have strong evidence But no evidence !?! (shouldn’t bigger imply different?)

Hypothesis Testing, III Notes: Shows that yes-no testing is different from usual logic (so be careful with it!) Reason: 2-sided admits more uncertainty into process (so near boundary could make a difference, as happened here) Gray level view avoids this: (1-sided has stronger evidence, as expected)

Hypothesis Testing, III Lesson: 1-sided vs. 2-sided issues need careful: Implementation (choice does affect answer) Interpretation (idea of being tested depends on this choice) Better from gray level viewpoint

Hypothesis Testing, III CAUTION: Read problem carefully to distinguish between: One-sided Hypotheses - like: Two-sided Hypotheses - like: