The Practice of Statistics in the Life Sciences Fourth Edition

Slides:



Advertisements
Similar presentations
Objectives (BPS chapter 15)
Advertisements

Evaluating Hypotheses Chapter 9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics.
Introduction to Inference Estimating with Confidence Chapter 6.1.
Chapter 9 Hypothesis Testing.
Tests of significance: The basics BPS chapter 15 © 2006 W.H. Freeman and Company.
Objectives (BPS chapter 14)
Overview Definition Hypothesis
Tests of significance: The basics BPS chapter 15 © 2006 W.H. Freeman and Company.
Objectives 6.2 Tests of significance
14. Introduction to inference
Introduction to inference Tests of significance IPS chapter 6.2 © 2006 W.H. Freeman and Company.
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.
The Practice of Statistics Third Edition Chapter 10: Estimating with Confidence Copyright © 2008 by W. H. Freeman & Company Daniel S. Yates.
Chapter 10 AP Statistics St. Francis High School Fr. Chris.
Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test.
Introduction to Inferece BPS chapter 14 © 2010 W.H. Freeman and Company.
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Introduction to the Practice of Statistics Fifth Edition Chapter 6: Introduction to Inference Copyright © 2005 by W. H. Freeman and Company David S. Moore.
6.1 Inference for a Single Proportion  Statistical confidence  Confidence intervals  How confidence intervals behave.
Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as.
Confidence intervals: The basics BPS chapter 14 © 2006 W.H. Freeman and Company.
Copyright ©2013 Pearson Education, Inc. publishing as Prentice Hall 9-1 σ σ.
Hypothesis Testing An understanding of the method of hypothesis testing is essential for understanding how both the natural and social sciences advance.
Tests of significance: The basics BPS chapter 14 © 2006 W.H. Freeman and Company.
IPS Chapter 6 DAL-AC FALL 2015  6.1: Estimating with Confidence  6.2: Tests of Significance  6.3: Use and Abuse of Tests  6.4: Power and Inference.
Introduction to inference Tests of significance IPS chapter 6.2 © 2006 W.H. Freeman and Company.
© Copyright McGraw-Hill 2004
Chapter 13 Sampling distributions
Tests of significance: The basics BPS chapter 14 © 2006 W.H. Freeman and Company.
Introduction to inference Estimating with confidence IPS chapter 6.1 © 2006 W.H. Freeman and Company.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.2 Tests About a Population.
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.
Uncertainty and confidence If you picked different samples from a population, you would probably get different sample means ( x ̅ ) and virtually none.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 7 Inferences Concerning Means.
Chapter Nine Hypothesis Testing.
More on Inference.
CHAPTER 9 Testing a Claim
Introduction to inference Estimating with confidence
14. Introduction to inference
Introduction to Inference
Assumptions For testing a claim about the mean of a single population
Unit 5: Hypothesis Testing
Chapter 9: Testing a Claim
CHAPTER 9 Testing a Claim
Chapters 20, 21 Hypothesis Testing-- Determining if a Result is Different from Expected.
Hypothesis Tests for 1-Sample Proportion
Tests of significance: The basics
Objectives 6.2 Tests of significance
The Practice of Statistics in the Life Sciences Fourth Edition
More on Inference.
Chapter 9 Hypothesis Testing.
Confidence intervals: The basics
Essential Statistics Introduction to Inference
Lecture 10/24/ Tests of Significance
Unit 5: Hypothesis Testing
Chapter 9: Testing a Claim
Confidence intervals: The basics
Unit 5: Hypothesis Testing
Chapter 9: Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Chapter 9: Testing a Claim
CHAPTER 16: Inference in Practice
Chapter 9: Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Objectives 6.1 Estimating with confidence Statistical confidence
Objectives 6.1 Estimating with confidence Statistical confidence
Presentation transcript:

The Practice of Statistics in the Life Sciences Fourth Edition Chapter 14: Introduction to inference Copyright © 2018 W. H. Freeman and Company

Objectives Introduction to inference Statistical estimation Margin of error and confidence levels Confidence interval for a Normal population mean (σ known) Hypothesis testing The P-value Test for a Normal population mean (σ known) Tests from confidence intervals

Statistical estimation If you picked different samples from a population, you would probably get different sample means ( 𝑥 ) and virtually none of them would actually equal the true population mean, .

Use of sampling distributions If the population is N(μ, σ), the sampling distribution is N(μ, σ/√n). If not, the sampling distribution is ~N(μ, σ/√n) if n is large enough.  We take one random sample of size n, and rely on the known properties of the sampling distribution.

Visualization of confidence When we take a random sample using a computer applet, we can compute the sample mean and an interval of size plus-or-minus 2 σ/√n around the mean. Based on the 68–95–99.7% rule, we can expect that about 95% of all intervals computed with this method capture the parameter μ. Simulation using the applet from http://www.whfreeman.com/psls3e/ Only the red interval did not capture the population mean μ. All the other intervals in this simulation did capture μ. This reflects the overall success rate of the method.

Confidence intervals A confidence interval is a range of values with an associated probability, or confidence level, C. This probability quantifies the chance that the interval contains the unknown population parameter. We have confidence C that µ falls within the interval computed.

The margin of error A confidence interval (“CI”) can be expressed as: a center ± a margin of error m: µ within 𝑥 ± m an interval: µ within ( 𝑥 −m) to ( 𝑥 +m) The confidence level C (in %) represents an area of corresponding size C under the sampling distribution. Note that not all CI are symmetric about the parameter. Some complex methods produce asymmetric intervals.

Margin of error interpretation (1 of 2) A 95% confidence interval for the mean body temperature (in °F) was computed as (98.1, 98.4), based on body temperatures from a sample of 130 healthy adults. The correct interpretation of this interval is: 95% of observations in the sample have body temperature between 98.1 and 98.4°F. 95% of the individuals in the population should have body temperature between 98.1 and 98.4°F. We are 95% confident that the population mean body temperature is a value between 98.1 and 98.4°F. C) A confidence interval estimates a parameter with some confidence level, here 95%. D) The margin of error is half the size of the entire interval.

Margin of error interpretation (2 of 2) The margin of error for this interval is: 95% 98.25°F 0.3°F 0.15°F. C) A confidence interval estimates a parameter with some confidence level, here 95%. D) The margin of error is half the size of the entire interval.

CI for a Normal population mean (σ known) When taking a random sample from a Normal population with known standard deviation σ, a level C confidence interval for µ is: 𝑥 ±𝑧∗ 𝜎 𝑛 or 𝑥 ±𝑚 σ/√n is the standard deviation of the sampling distribution C is the area under the N(0,1) between −z* and z* Use technology or Table C to obtain confidence intervals.

Finding z-values We can use a table of z- and t-values (Table C). For a given confidence level C, the appropriate z*-value is listed in the same column.

Confidence interval calculations (1 of 2) Density of bacteria in solution Measurement equipment has Normal distribution with standard deviation σ = 1 million bacteria/mL of fluid. Three measurements made: 24, 29, and 31 million bacteria/mL. Mean: 𝑥 =28 million bacteria/ml. Find the 99% and 90% CI. 99% confidence interval for the true density, z* = 2. 576 𝑥 ±𝑧∗ 𝜎 𝑛 =28±2.576 1 √3 ≈28±1.5 million bacteria/mL

Confidence interval calculations (2 of 2) 90% confidence interval for the true density, z* = 1.645 𝑥 ±𝑧∗ 𝜎 𝑛 =28±1.645 1 √3 ≈28±0.9 million bacteria/mL Confidence level C 90% 95% 99% Critical value z* 1.645 1.960 2.576

Confidence level and margin of error (1 of 2) The confidence level C determines the value of z* (in Table C). The margin of error also depends on z*. 𝑚=𝑧∗ 𝜎 𝑛

Confidence level and margin of error (2 of 2) Higher confidence C implies a larger margin of error m (less precision more accuracy). A lower confidence level C produces a smaller margin of error m (more precision less accuracy).  We want high confidence, but also narrow intervals. We generally choose the confidence level first, then increase n to achieve a narrow interval.

Hypothesis testing (1 of 2) Someone makes a claim about the unknown value of a population parameter. We check whether or not this claim makes sense in light of the “evidence” gathered (sample data). A test of statistical significance tests a specific hypothesis using sample data to decide on the validity of the hypothesis.

Hypothesis testing (2 of 2) Blood levels of inorganic phosphorus are known to vary Normally among adults, with mean 1.2 and standard deviation 0.1 mmol/L. But is the true mean inorganic phosphorus level lower among the elderly? The average inorganic phosphorus level of a random sample of 12 healthy elderly subjects is 1.128 mmol/L. Is this smaller mean phosphorus level simply due to chance variation? Is it evidence that the true mean phosphorus level in elderly individuals is lower than 1.2 mmol/L?

Null and alternative hypotheses The null hypothesis, H0, is a very specific statement about a parameter of the population(s). The alternative hypothesis, Ha, is a more general statement that complements yet is mutually exclusive with the null hypothesis. Phosphorus levels in the elderly: H0: µ = 1.2 mmol/L Ha: µ < 1.2 mmol/L (µ is smaller due to changing physiology) The null and alternative hypotheses are always statements about the population, not statements about samples. µ is the mean phosphorus level for the elderly population.

One-sided versus two-sided alternatives A two-tail or two-sided alternative is symmetric: Ha:   µ  [a specific value or another parameter] A one-tail or one-sided alternative is asymmetric and specific: Ha:   µ < [a specific value or another parameter] OR Ha:   µ > [a specific value or another parameter] What determines the choice of a one-sided versus two-sided test is the question we are asking and what we know about the problem before performing the test. If the question or problem is asymmetric, then Ha should be one-sided. If not, Ha should be two-sided. You should never decide on a one-sided or two-sided alternative based on your sample data alone. The sample data will be used to evaluate, or test, the null hypothesis.

Examples of hypotheses (1 of 2) Is the active ingredient concentration as stated on the label (325 mg/tablet)? H0: µ = 325 Ha: µ ≠ 325 Is nicotine content greater than the written 1 mg/cigarette, on average? H0: µ = 1 Ha: µ > 1 Does a drug create a change in blood pressure, on average? H0: µ = 0 Ha: µ ≠ 0 Notice that the third question does not offer an explicit value for µ. What to write in the null and alternative hypotheses is implied in the question. We ask about a “change” in blood pressure. A “change” is anything not equal to zero. The last question gives more information than is necessary to write the null and alternative hypotheses. The sample results are never used to write the test’s hypotheses.

Examples of hypotheses (2 of 2) Does a particular stream have an unhealthy mean oxygen content (a level below 5 mg per liter)? Ecologists collect a liter of water from each of 45 random locations along a stream and measure the amount of dissolved oxygen in each. They find a mean of 4.62 mg per liter. H0:  = 5 Ha:  < 5 Notice that the third question does not offer an explicit value for µ. What to write in the null and alternative hypotheses is implied in the question. We ask about a “change” in blood pressure. A “change” is anything not equal to zero. The last question gives more information than is necessary to write the null and alternative hypotheses. The sample results are never used to write the test’s hypotheses.

The P-value Phosphorus levels vary Normally with standard deviation s = 0.1 mmol/L. H0: µ = 1.2 mmol/L versus Ha: µ < 1.2 mmol/L The mean phosphorus level from the 12 elderly subjects is 1.128 mmol/L. What is the probability of drawing a random sample with a mean as small as this one or even smaller, if H0 is true? P-value: The probability, if H0 was true, of obtaining a sample statistic at least as extreme (in the direction of Ha) as the one obtained.

Visualizing the P-value Phosphorus levels vary Normally with standard deviation s = 0.1 mmol/L. H0: µ = 1.2 mmol/L versus Ha: µ < 1.2 mmol/L The mean phosphorus level from the 12 elderly subjects is 1.128 mmol/L. Applet from http://www.whfreeman.com/psls3e/ The chance of seeing a sample mean less than our observed average of 1.128 is 0.0063.

Interpreting a P-value Could random variation alone account for the difference between H0 and observations from a random sample?  Small P-values are strong evidence AGAINST H0 and we reject H0. The findings are “statistically significant.”  P-values that are not small don’t give enough evidence against H0 and we fail to reject H0. Beware: We can never “prove H0.” You could think of it this way: When solving a crime, a person with a good alibi will no longer remain a suspect. But a person without an alibi is not necessarily the culprit, just still a suspect. Likewise, we can reject H0 if the sample data contradicts it. But failing to reject H0 does not make it true.

Range of P-values P-values are probabilities, so they are always a number between 0 and 1. The order of magnitude of the P-value matters more than its exact numerical value.

The significance level α (1 of 2) The significance level, α, is the largest P-value tolerated for rejecting H0 (how much evidence against H0 we require). This value is decided arbitrarily before conducting the test. When P-value ≤ α, we reject H0. When P-value > α, we fail to reject H0.

The significance level α (2 of 2) Example: Industry standards require a significance level α of 5%. Does the packaging machine need revision? A two-sided test is performed on a sample of data. The P-value is 4.56%. Because the P-value < 5%, the results are statistically significant at significance level 0.05.

Test for a population mean (σ known) To test H0: µ = µ0 using a random sample of size n from a Normal population with known standard deviation σ, we use the null sampling distribution N(µ0, σ√n). The P-value is the area under N(µ0, σ√n) for values of x̅ at least as extreme in the direction of Ha as that of our random sample. Calculate the z-value then use Table B or C. Or use technology. 𝑧= 𝑥 − 𝜇 0 𝜎 𝑛

One-sided versus two-sided P-values (1 of 2) One-sided (one-tailed) test Two-sided (two-tailed) test

One-sided versus two-sided P-values (2 of 2) To calculate the P-value for a two-sided test, use the symmetry of the normal curve. Find the P-value for a one-sided test and double it.

P-values in Table C

Hypothesis testing example (1 of 2) Do the elderly have a mean phosphorus level below 1.2 mmol/L? H0: µ = 1.2 versus Ha: µ < 1.2 What would be the probability of drawing a random sample such as this or worse if H0 was true? 𝑥 =1.128 𝜎=0.1 𝑛=12 𝑥 is normally distributed 𝑧= 𝑥 −𝜇 𝜎 𝑛 = 1.128−1.2 0.1 12 =−2.494

Hypothesis testing example (2 of 2) Table B: P-value = P(z ≤ –2.49) = 0.0064 Table C: one-sided P-value is between 0.005 and 0.01 (use |z|). The probability of getting a random sample average so different from µ0 is so low that we reject H0. Conclusion: The mean phosphorus level among the elderly is significantly less than 1.2 mmol/L.

Tests from confidence intervals Because a two-sided test is symmetric, you can easily use a confidence interval to test a two-sided hypothesis. In a two-sided test, C = 1 – α. C confidence level α significance level

Logic of confidence interval test (1 of 2) We found a 99% confidence interval for the true bacterial density of 𝑥 ±𝑚=28±1.5, or 26.5 to 29.5 million bacteria/ per mL. With 99% confidence, could the population mean be µ =25 million/mL? µ = 29?

Logic of confidence interval test (2 of 2) A confidence interval gives a black and white answer: Reject or don’t reject H0. But it also estimates a range of likely values for the true population mean µ. A P-value quantifies how strong the evidence is against the H0. But if you reject H0, it doesn’t provide any information about the true population mean µ.