STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample

Slides:



Advertisements
Similar presentations
“Students” t-test.
Advertisements

Introduction to Statistics
Inferences About Means of Single Samples Chapter 10 Homework: 1-6.
Chapter 3 Hypothesis Testing. Curriculum Object Specified the problem based the form of hypothesis Student can arrange for hypothesis step Analyze a problem.
BCOR 1020 Business Statistics Lecture 21 – April 8, 2008.
Inference about a Mean Part II
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Chapter 9 Hypothesis Testing.
UWHC Scholarly Forum April 17, 2013 Ismor Fischer, Ph.D. UW Dept of Statistics, UW Dept of Biostatistics and Medical Informatics
Power and Sample Size IF IF the null hypothesis H 0 : μ = μ 0 is true, then we should expect a random sample mean to lie in its “acceptance region” with.
ECONOMETRICS I CHAPTER 5: TWO-VARIABLE REGRESSION: INTERVAL ESTIMATION AND HYPOTHESIS TESTING Textbook: Damodar N. Gujarati (2004) Basic Econometrics,
1/2555 สมศักดิ์ ศิวดำรงพงศ์
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
1 Power and Sample Size in Testing One Mean. 2 Type I & Type II Error Type I Error: reject the null hypothesis when it is true. The probability of a Type.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 12 Inference About A Population.
Chapter 9: Testing Hypotheses Overview Research and null hypotheses One and two-tailed tests Type I and II Errors Testing the difference between two means.
: An alternative representation of level of significance. - normal distribution applies. - α level of significance (e.g. 5% in two tails) determines the.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Applied Quantitative Analysis and Practices LECTURE#14 By Dr. Osman Sadiq Paracha.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Introduction to Basic Statistical Methods Part 1: “Statistics in a Nutshell” UWHC Scholarly Forum March 19, 2014 Ismor Fischer, Ph.D. UW Dept of Statistics.
Introduction to Basic Statistical Methods Part 1: Statistics in a Nutshell UWHC Scholarly Forum May 21, 2014 Ismor Fischer, Ph.D. UW Dept of Statistics.
Chapter 9: Introduction to the t statistic. The t Statistic The t statistic allows researchers to use sample data to test hypotheses about an unknown.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 7 Inferences Concerning Means.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Chapter 9 Introduction to the t Statistic
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Hypothesis Testing.
HYPOTHESIS TESTING.
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
Review of Power of a Test
Statistics for Managers Using Microsoft® Excel 5th Edition
Lecture Slides Elementary Statistics Twelfth Edition
Chapter 9 Hypothesis Testing.
Confidence Interval Estimation
Lecture Nine - Twelve Tests of Significance.
ECO 173 Chapter 10: Introduction to Estimation Lecture 5a
3. The X and Y samples are independent of one another.
Chapter 4. Inference about Process Quality
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
Chapter 6 Confidence Intervals.
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
CHAPTER 6 Statistical Inference & Hypothesis Testing
Chapter 8 Hypothesis Testing with Two Samples.
Chapter 4 Continuous Random Variables and Probability Distributions
Hypothesis Testing: Hypotheses
ECO 173 Chapter 10: Introduction to Estimation Lecture 5a
Elementary Statistics
Hypothesis Tests for a Population Mean in Practice
CI for μ When σ is Unknown
Chapter 9 Hypothesis Testing.
Review: What influences confidence intervals?
LESSON 20: HYPOTHESIS TESTING
Decision Errors and Power
Hypothesis Testing.
STAT Z-Tests and Confidence Intervals for a
CHAPTER 6 Statistical Inference & Hypothesis Testing
CHAPTER 6 Statistical Inference & Hypothesis Testing
Chapter 10: One- and Two-Sample Tests of Hypotheses:
Elementary Statistics: Picturing The World
Lecture 10/24/ Tests of Significance
Confidence Intervals.
Hypothesis Testing and Confidence Intervals
Last Update 12th May 2011 SESSION 41 & 42 Hypothesis Testing.
Chapter 8 Estimation: Single Population
Data Analysis and Statistical Software I ( ) Quarter: Autumn 02/03
Presentation transcript:

STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample 7.1 - Basic Properties of Confidence Intervals 7.2 - Large-Sample Confidence Intervals for a Population Mean and Proportion 7.3 - Intervals Based on a Normal Population Distribution 7.4 - Confidence Intervals for the Variance and Standard Deviation of a Normal Pop Chapter 8 - Tests of Hypotheses Based on a Single Sample 8.1 - Hypotheses and Test Procedures 8.2 - Z-Tests for Hypotheses about a Population Mean 8.3 - The One-Sample T-Test 8.4 - Tests Concerning a Population Proportion 8.5 - Further Aspects of Hypothesis Testing

“Statistical Inference” POPULATION via… “Hypothesis Testing” Study Question: Has “Mean (i.e., average) Age at First Birth” of women in the U.S. changed since 2010 (25.4 yrs old)? Present Day: Assume “Mean Age at First Birth” follows a normal distribution (i.e., “bell curve”) in the population. Assume Population Distribution X H0: pop mean age  = 25.4 (i.e., no change since 2010) Random Sample size n = 400 ages The reasonableness of the normality assumption is empirically verifiable (e.g., histogram, Q-Q plot) and in fact formally testable from the sample data. If violated (e.g., skewed) or inconclusive (e.g., small sample size), then a transformation (e.g. logarithm) or “distribution-free” nonparametric tests should be used instead… Examples: Sign Test, Wilcoxon Signed Rank Test (= Mann-Whitney U Test) x4 x1 x3 x2 x5 … etc… x400

“Statistical Inference” POPULATION via… “Hypothesis Testing” Study Question: Has “Mean (i.e., average) Age at First Birth” of women in the U.S. changed since 2010 (25.4 yrs old)? Present Day: Assume “Mean Age at First Birth” follows a normal distribution (i.e., “bell curve”) in the population. Population Distribution X H0: pop mean age  = 25.4 (i.e., no change since 2010) Random Sample size n = 400 ages x4 x1 Sample size n partially depends on the power of the test, i.e., the desired probability of correctly rejecting a false null hypothesis (80% or more). Coming up next! x3 x2 x5 … etc… x400

P(Accept H0 | H0 is true) = 1 – α. P(Reject H0 | H0 is true) = α. Power and Sample Size IF the null hypothesis H0: μ = μ0 is true, then we should expect a random sample mean to lie in its “acceptance region” with probability 1 – α, the “confidence level.” That is, P(Accept H0 | H0 is true) = 1 – α. Therefore, we should expect a random sample mean to lie in its “rejection region” with probability α, the “significance level.” P(Reject H0 | H0 is true) = α. 1   H0:  = 0 Acceptance Region for H0 Rejection Region /2 “Null Distribution” “Type 1 Error” μ0 + zα/2 (σ /

P(Reject H0 | H0 is false) = 1 – . P(Accept H0 | H0 is false) = . Power and Sample Size 1   H0:  = 0 Acceptance Region for H0 Rejection Region /2 “Null Distribution” “Alternative Distribution” IF the null hypothesis H0: μ = μ0 is false, then the “power” to correctly reject it in favor of a particular alternative HA: μ = μ1 is P(Reject H0 | H0 is false) = 1 – . Thus, P(Accept H0 | H0 is false) = . 1 –  “Type 2 Error”  HA: μ = μ1 Set them equal to each other, and solve for n… μ0 + zα/2 (σ / μ1 – z (σ /

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis value HA: μ = μ1 Alternative Hypothesis specific value  significance level (or equivalently, confidence level 1 – ) 1 –  power (or equivalently, Type 2 error rate  ) Then the minimum required sample size is: N(0, 1) 1    z Example: σ = 1.5 yrs, μ0 = 25.4 yrs,  = .05  z.025 = 1.96 Suppose it is suspected that currently, μ1 = 26 yrs. Want more power! Want 90% power of correctly rejecting H0 in favor of HA, if it is false  1 –  = .90   = .10  z.10 = 1.28  = |26 – 25.4| / 1.5 = 0.4 qnorm(.9) So… minimum sample size required is n  66

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis value HA: μ = μ1 Alternative Hypothesis specific value  significance level (or equivalently, confidence level 1 – ) 1 –  power (or equivalently, Type 2 error rate  ) Then the minimum required sample size is: N(0, 1) 1    z Example: σ = 1.5 yrs, μ0 = 25.4 yrs,  = .05  z.025 = 1.96 Change μ1 Suppose it is suspected that currently, μ1 = 26 yrs. Want 95% power of correctly rejecting H0 in favor of HA, if it is false Want 90% power of correctly rejecting H0 in favor of HA, if it is false  1 –  = .90  1 –  = .95   = .05   = .10  z.05 = 1.645  z.10 = 1.28  = |26 – 25.4| / 1.5 = 0.4 qnorm(.9) qnorm(.975) So… minimum sample size required is n  82 n  66

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis value HA: μ = μ1 Alternative Hypothesis specific value  significance level (or equivalently, confidence level 1 – ) 1 –  power (or equivalently, Type 2 error rate  ) Then the minimum required sample size is: N(0, 1) 1    z Example: σ = 1.5 yrs, μ0 = 25.4 yrs,  = .05  z.025 = 1.96 Suppose it is suspected that currently, μ1 = 25.7 yrs. Suppose it is suspected that currently, μ1 = 26 yrs. Want 95% power of correctly rejecting H0 in favor of HA, if it is false  1 –  = .95   = .05  z.05 = 1.645  = |25.7 – 25.4| / 1.5 = 0.2  = |26 – 25.4| / 1.5 = 0.4 qnorm(.975) So… minimum sample size required is n  82 n  325

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis value HA: μ = μ1 Alternative Hypothesis specific value  significance level (or equivalently, confidence level 1 – ) 1 –  power (or equivalently, Type 2 error rate  ) Then the minimum required sample size is: N(0, 1) 1    z Example: σ = 1.5 yrs, μ0 = 25.4 yrs,  = .05  z.025 = 1.96 Suppose it is suspected that currently, μ1 = 25.7 yrs. With n = 400, how much power exists to correctly reject H0 in favor of HA, if it is false? Power = 1 –  = = 0.9793, i.e., 98%

Comments

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis HA: μ ≠ μ0 Alternative Hypothesis (2-sided)  significance level (or equivalently, confidence level 1 – ) n sample size From this, we obtain… “standard error” s.e. sample mean sample standard deviation …with which to test the null hypothesis (via CI, AR, p-value). In practice however, it is far more common that the true population standard deviation σ is unknown. So we must estimate it from the sample! (estimate) x1, x2,…, xn Recall that

Given: X ~ N(μ , σ ) Normally-distributed population random variable, with unknown mean, but known standard deviation H0: μ = μ0 Null Hypothesis HA: μ ≠ μ0 Alternative Hypothesis (2-sided)  significance level (or equivalently, confidence level 1 – ) n sample size From this, we obtain… “standard error” s.e. sample mean sample standard deviation …with which to test the null hypothesis (via CI, AR, p-value). In practice however, it is far more common that the true population standard deviation σ is unknown. So we must estimate it from the sample! This introduces additional variability from one sample to another… PROBLEM??? Not if n is “large”…say,  30. (estimate) But what if n < 30? T-test! x1, x2,…, xn Recall that

Student’s T-Distribution … is actually a family of distributions, indexed by the degrees of freedom, labeled tdf. William S. Gossett (1876 - 1937) t2 t1 t10 t3 Z ~ N(0, 1) As the sample size n gets large, tdf converges to the standard normal distribution Z ~ N(0, 1). So the T-test is especially useful when n < 30.

Student’s T-Distribution … is actually a family of distributions, indexed by the degrees of freedom, labeled tdf. William S. Gossett (1876 - 1937) Z ~ N(0, 1) t4 .025 1.96 As the sample size n gets large, tdf converges to the standard normal distribution Z ~ N(0, 1). So the T-test is especially useful when n < 30.

Lecture Notes Appendix… or… qt(.975, 4) qt(.025, 4, lower.tail = F) [1] 2.776445

Student’s T-Distribution … is actually a family of distributions, indexed by the degrees of freedom, labeled tdf. William S. Gossett (1876 - 1937) Z ~ N(0, 1) t4 .025 .025 1.96 2.776 Because any t-distribution has heavier tails than the Z-distribution, it follows that for the same right-tailed area value, t-score > z-score.

If n is small, T-score > 2. … the “T-score" increases (from ≈ 2 to a max of 12.706 for a 95% confidence level) as n decreases  larger margin of error  less power to reject, even if a genuine statistically significant difference exists! If n is large, T-score ≈ 2.

Given: X = Age at first birth ~ N(μ , σ ) H0: μ = 25.4 yrs Null Hypothesis HA: μ ≠ 25.4 yrs Alternative Hypothesis Previously… σ = 1.5 yrs, n = 400, statistically significant at  = .05 Now suppose that σ is unknown, and n < 30. Example: n = 16, s = 1.22 yrs standard error (estimate) = .025 critical value = t15, .025

Lecture Notes Appendix…

Given: X = Age at first birth ~ N(μ , σ ) H0: μ = 25.4 yrs Null Hypothesis HA: μ ≠ 25.4 yrs Alternative Hypothesis Previously… σ = 1.5 yrs, n = 400, statistically significant at  = .05 Now suppose that σ is unknown, and n < 30. Example: n = 16, s = 1.22 yrs 95% margin of error = (2.131)(0.305 yrs) = 0.65 yrs standard error (estimate) = .025 critical value = t15, .025 = 2.131 95% Confidence Interval = (25.9 – 0.65, 25.9 + 0.65) = (25.25, 26.55) yrs p-value = Test Statistic:

Lecture Notes Appendix…

Given: X = Age at first birth ~ N(μ , σ ) H0: μ = 25.4 yrs Null Hypothesis HA: μ ≠ 25.4 yrs Alternative Hypothesis Previously… σ = 1.5 yrs, n = 400, statistically significant at  = .05 Now suppose that σ is unknown, and n < 30. Example: n = 16, s = 1.22 yrs 95% margin of error = (2.131)(0.305 yrs) = 0.65 yrs standard error (estimate) = .025 critical value = t15, .025 = 2.131 95% Confidence Interval = CONCLUSIONS: (25.9 – 0.65, 25.9 + 0.65) = The 95% CI does contain the null value μ = 25.4. (25.25, 26.55) yrs The p-value is between .10 and .20, i.e., > .05. (Note: The R command 2 * pt(1.639, 15, lower.tail = F) gives the exact p-value as .122.) p-value = = 2 (between .05 and .10) Not statistically significant; small n gives low power! = between .10 and .20.

… with sample mean = 25.9 and sample sd = 1.22. Edited R code: y = rnorm(16, 0, 1) z = (y - mean(y)) / sd(y) x = 25.9 + 1.22*z sort(round(x, 1)) Generates a normally-distributed random sample of 16 age values… 24.0 24.2 24.6 24.7 25.1 25.6 25.6 25.7 25.9 26.0 26.4 27.0 27.0 27.2 27.6 28.0 c(mean(x), sd(x)) [1] 25.90 1.22 … with sample mean = 25.9 and sample sd = 1.22. t.test(x, mu = 25.4) One Sample t-test data: x t = 1.6393, df = 15, p-value = 0.1219 alternative hypothesis: true mean is not equal to 25.4 95 percent confidence interval: 25.24991 26.55009 sample estimates: mean of x 25.9

See… http://pages.stat.wisc.edu/~ifischer/Intro_Stat/Lecture_Notes/6_-_Statistical_Inference/HYPOTHESIS_TESTING_SUMMARY.pdf