Confidence intervals and hypothesis testing Petter Mostad 2005.10.03.

Slides:



Advertisements
Similar presentations
Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Advertisements

CHAPTER 21 Inferential Statistical Analysis. Understanding probability The idea of probability is central to inferential statistics. It means the chance.
Lecture 6 Outline – Thur. Jan. 29
Sampling: Final and Initial Sample Size Determination
Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
1 Hypothesis testing. 2 A common aim in many studies is to check whether the data agree with certain predictions. These predictions are hypotheses about.
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 9 Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and.
Chapter 10 Section 2 Hypothesis Tests for a Population Mean
Inferential Statistics & Hypothesis Testing
EPIDEMIOLOGY AND BIOSTATISTICS DEPT Esimating Population Value with Hypothesis Testing.
Sample size computations Petter Mostad
9-1 Hypothesis Testing Statistical Hypotheses Statistical hypothesis testing and confidence interval estimation of parameters are the fundamental.
Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study –Two sample t-test –Confidence Intervals Testing.
IEEM 3201 Two-mean Hypothesis Testing: Two means, Two proportions.
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 10 Notes Class notes for ISE 201 San Jose State University.
4-1 Statistical Inference The field of statistical inference consists of those methods used to make decisions or draw conclusions about a population.
Inference about a Mean Part II
T-Tests Lecture: Nov. 6, 2002.
Aaker, Kumar, Day Seventh Edition Instructor’s Presentation Slides
Chapter 9 Hypothesis Testing.
BCOR 1020 Business Statistics Lecture 20 – April 3, 2008.
BCOR 1020 Business Statistics
5-3 Inference on the Means of Two Populations, Variances Unknown
Hypothesis Testing :The Difference between two population mean :
©2006 Thomson/South-Western 1 Chapter 10 – Hypothesis Testing for the Mean of a Population Slides prepared by Jeff Heyl Lincoln University ©2006 Thomson/South-Western.
Inference about Population Parameters: Hypothesis Testing
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 8 Tests of Hypotheses Based on a Single Sample.
Statistical Inference Dr. Mona Hassan Ahmed Prof. of Biostatistics HIPH, Alexandria University.
AM Recitation 2/10/11.
1 © Lecture note 3 Hypothesis Testing MAKE HYPOTHESIS ©
Statistical inference: confidence intervals and hypothesis testing.
Hypothesis testing – mean differences between populations
Chapter 9.3 (323) A Test of the Mean of a Normal Distribution: Population Variance Unknown Given a random sample of n observations from a normal population.
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.
9-1 Hypothesis Testing Statistical Hypotheses Definition Statistical hypothesis testing and confidence interval estimation of parameters are.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Learning Objectives In this chapter you will learn about the t-test and its distribution t-test for related samples t-test for independent samples hypothesis.
Essential Statistics Chapter 131 Introduction to Inference.
CHAPTER 14 Introduction to Inference BPS - 5TH ED.CHAPTER 14 1.
Maximum Likelihood Estimator of Proportion Let {s 1,s 2,…,s n } be a set of independent outcomes from a Bernoulli experiment with unknown probability.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
HYPOTHESIS TESTING. Statistical Methods Estimation Hypothesis Testing Inferential Statistics Descriptive Statistics Statistical Methods.
Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests.
Testing Hypothesis That Data Fit a Given Probability Distribution Problem: We have a sample of size n. Determine if the data fits a probability distribution.
Learning Objectives Copyright © 2002 South-Western/Thomson Learning Statistical Testing of Differences CHAPTER fifteen.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
Introduction to Inference: Confidence Intervals and Hypothesis Testing Presentation 4 First Part.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
MeanVariance Sample Population Size n N IME 301. b = is a random value = is probability means For example: IME 301 Also: For example means Then from standard.
One-Sample Hypothesis Tests Chapter99 Logic of Hypothesis Testing Statistical Hypothesis Testing Testing a Mean: Known Population Variance Testing a Mean:
Sampling and estimation Petter Mostad
© Copyright McGraw-Hill 2004
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 26 Chapter 11 Section 1 Inference about Two Means: Dependent Samples.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
ENGR 610 Applied Statistics Fall Week 7 Marshall University CITE Jack Smith.
Today: Hypothesis testing. Example: Am I Cheating? If each of you pick a card from the four, and I make a guess of the card that you picked. What proportion.
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric.
Chapter 7 Inference Concerning Populations (Numeric Responses)
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 7 Inferences Concerning Means.
Chapter 10: The t Test For Two Independent Samples.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Chapter 9: Hypothesis Tests for One Population Mean 9.5 P-Values.
Learning Objectives Describe the hypothesis testing process Distinguish the types of hypotheses Explain hypothesis testing errors Solve hypothesis testing.
Chapter 9 Hypothesis Testing.
When we free ourselves of desire,
Chapter 9 Hypothesis Testing.
Discrete Event Simulation - 4
Presentation transcript:

Confidence intervals and hypothesis testing Petter Mostad

Confidence intervals (repetition) Assume μ and σ 2 are some real numbers, and assume the data X 1,X 2,…,X n are a random sample from N(μ,σ 2 ). –Then –thus –so and we say that is a confidence interval for μ with 95% confidence, based on the statistic

Confidence intervals, general idea We have a model with an unknown parameter We find a ”statistic” (function of the sample) with a known distribution, depending only on the unknown parameter This distribution is used to construct an interval with the following property: If you repeat many times selecting a parameter and simulating the statistic, then about (say) 95% of the time, the confidence interval will contain the parameter

Hypothesis testing Selecting the most plausible model for the data, among those suggested Example: Assume X 1,X 2,…,X n is a random sample from N(μ,σ 2 ), where σ 2 is known, but μ is not; we want to select μ fitting the data. One possibility is to look at the probability of observing the data given different values for μ. (We will return to this) Another is to do a hypothesis test

Example We select two alternative hypotheses: –H 0 : –H 1 : Use the value of to test H 0 versus H 1 : If is far from, it will indicate H 1. Under H 0, we know that Reject H 0 if is outside

General outline for hypothesis testing The possible hypotheses are divided into H0, the null hypothesis, and H1, the alternative hypothesis A hypothesis can be –Simple, so that it is possible to compute the probability of data (e.g., ) –Composite, i.e., a collection of simple hypotheses (e.g., )

General outline (cont.) A test statistic is selected. It must: –Have a higher probability for ”extreme” values under H 1 than under H 0 –Have a known distribution under H 0 (when simple) If the value of the test statistic is ”too extreme”, then H 0 is rejected. The probability, under H 0, of observing the given data or something more extreme is called the p- value. Thus we reject H 0 if the p-value is small. The value at which we reject H 0 is called the significance level.

Note: There is an asymmetry between H 0 and H 1 : In fact, if the data is inconclusive, we end up not rejecting H 0. If H 0 is true the probability to reject H 0 is (say) 5%. That DOES NOT MEAN we are 95% certain that H 0 is true! How much evidence we have for choosing H 1 over H 0 depends entirely on how much more probable rejection is if H 1 is true.

Errors of types I and II The above can be seen as a decision rule for H0 or H1. For any such rule we can compute (if both H0 and H1 are simple hypotheses): P(accept | H 0 )P(accept | H 1 ) P(reject | H 0 )P(reject | H 1 ) Accept H 0 Reject H 0 H 0 true H 1 true TYPE II error TYPE I error Significance 1 - power

Significance and power If H 0 is composite, we compute the significance from the simple hypothesis that gives the largest probability of rejecting H 0. If H 1 is composite, we compute a power value for each simple hypothesis. Thus we get a power function.

Example 1: Normal distribution with unknown variance Assume Then Thus So a confidence interval for, with significance is given by

Example 1 (Hypothesis testing) Hypotheses: Test statistic under H 0 Reject H 0 if or if Alternatively, the p-value for the test can be computed (if ) as the such that

Example 1 (cont.) Hypotheses: Test statistic assuming Reject H 0 if Alternatively, the p-value for the test can be computed as the such that

Example 1 (cont.) Assume that you want to analyze as above the data in some column of an SPSS table. Use ”Analyze” => ”Compare means” => ”One-sample T Test” You get as output a confidence interval, and a test as the one described above. You may adjust the confidence level using ”Options…”

Example 2: Differences between means Assume and We would like to study the difference Four different cases: –Matched pairs –Known population variances –Unknown but equal population variances –Unknown and possibly different pop. variances

Known population variances We get Confidence interval for

Unknown but equal population variances We get where Confidence interval for

Hypothesis testing: Unknown but equal population variances Hypotheses: Test statistic: Reject H 0 if or if ”T test with equal variances”

Unknown and possibly unequal population variances We get where Conf. interval for

Hypothesis test: Unknown and possibly unequal pop. variances Hypotheses: Test statistic Reject H 0 if or if ”T test with unequal variances”

Practical examples: The lengths of children in a class are measured at age 8 and at age 10. Use the data to find an estimate, with confidence limits, on how much children grow between these ages. You want to determine whether a costly operation is generally done more cheaply in France than in Norway. Your data is the actual costs of 10 such operations in Norway and 20 in France.

Example 3: Population proportions Assume, so that is a frequency. Then Thus Confidence interval for (approximately, for large n)

Example 3 (Hypothesis testing) Hypotheses: Test statistic under H 0, for large n Reject H 0 if or if

Example 4: Differences between population proportions Assume and, so that and are frequencies Then Confidence interval for (approximately)

Example 4 (Hypothesis testing) Hypotheses: Test statistic where Reject H 0 if

Example 5: The variance of a normal distribution Assume Then Thus Confidence interval for

Example 6: Comparing variances for normal distributions Assume We get F nx-1,ny-1 is an F distribution with n x -1 and n y -1 degrees of freedom We can use this exactly as before to obtain a confidence interval for and for testing for example if Note: The assumption of normality is crucial!

Sample size computations For a sample from a normal population with known variance, the size of the conficence interval for the mean depends only on the sample size. So we can compute the necessary sample size to match a required accuracy Note: If the variance is unknown, it must somehow be estimated on beforehand to do the computation Works also for population proportion estimation, giving an inequality for the required sample size

Power computations If you reject H 0, you know very little about the evidence for H 1 versus H 0 unless you study the power of the test. The power is 1 minus the probability of rejecting H 0 given that a hypothesis in H 1 is true. Thus it is a function of the possible hypotheses in H 1. We would like our tests to have as high power as possible.