Comparing two Rates Farrokh Alemi Ph.D.

Slides:



Advertisements
Similar presentations
Testing a Claim about a Proportion Assumptions 1.The sample was a simple random sample 2.The conditions for a binomial distribution are satisfied 3.Both.
Advertisements

1 Difference Between the Means of Two Populations.
Statistics Are Fun! Analysis of Variance
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter Hypothesis Tests Regarding a Parameter 10.
Inference about Population Parameters: Hypothesis Testing
Significance Tests for Proportions Presentation 9.2.
Copyright © Cengage Learning. All rights reserved. 11 Applications of Chi-Square.
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Tue, Oct 23, 2007.
PAIRED TEST Farrokh Alemi Ph.D.. Framework for Hypothesis Testing.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
Go to Index Analysis of Means Farrokh Alemi, Ph.D. Kashif Haqqi M.D.
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.
Go to index Two Sample Inference for Means Farrokh Alemi Ph.D Kashif Haqqi M.D.
HYPOTHESIS TESTING FRAMEWORK Farrokh Alemi Ph.D..
+ Chapter 12: Inference for Proportions Section 12.1 Inference for a Population Proportion.
Testing Hypotheses about a Population Proportion Lecture 31 Sections 9.1 – 9.3 Wed, Mar 22, 2006.
INFERENCE Farrokh Alemi Ph.D.. Point Estimates Point Estimates Vary.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Comparing Two Proportions Chapter 21. In a two-sample problem, we want to compare two populations or the responses to two treatments based on two independent.
Testing for a difference
STA 291 Spring 2010 Lecture 19 Dustin Lueker.
9.3 Hypothesis Tests for Population Proportions
CHAPTER 9 Testing a Claim
Chapter 9: Testing a Claim
Chapter 9 Hypothesis Testing.
Testing Hypotheses about a Population Proportion
Chapter 9: Testing a Claim
STA 291 Spring 2010 Lecture 18 Dustin Lueker.
Math 4030 – 10a Tests for Population Mean(s)
Chapter 9: Testing a Claim
Hypothesis Testing for Proportions
Chapter 8: Inference for Proportions
Significance Tests: A Four-Step Process
Unit 6 - Comparing Two Populations or Groups
Probability Calculus Farrokh Alemi Ph.D.
Chapter 9 Hypothesis Testing.
Elementary Statistics
Section 12.2: Tests about a Population Proportion
Chapter Nine Part 1 (Sections 9.1 & 9.2) Hypothesis Testing
Statistical Inference about Regression
Hypothesis tests for the difference between two proportions
One way ANALYSIS OF VARIANCE (ANOVA)
One-Way Analysis of Variance
Lecture 10/24/ Tests of Significance
Copyright © Cengage Learning. All rights reserved.
Chapter 9: Testing a Claim
Testing Hypotheses about a Population Proportion
Intro to Confidence Intervals Introduction to Inference
Chapter 9: Testing a Claim
Hypothesis Testing: The Difference Between Two Population Means
Chapter 9: Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Pull 2 samples of 20 pennies and record both averages (2 dots).
Chapter 9: Testing a Claim
STA 291 Summer 2008 Lecture 18 Dustin Lueker.
Xbar Chart By Farrokh Alemi Ph.D
Last Update 12th May 2011 SESSION 41 & 42 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
Testing Hypotheses about a Population Proportion
Section 11.1: Significance Tests: Basics
Chapter 9: Testing a Claim
Unit 5: Hypothesis Testing
Chapter 9: Testing a Claim
Presentation transcript:

Comparing two Rates Farrokh Alemi Ph.D. This is a lecture prepared by Farrokh Alemi based on OpenIntro statistics book. Farrokh Alemi Ph.D.

Framework for Hypothesis Testing Recall the framework for hypothesis testing. First we examine the assumptions, then state the hypothesis, calculate the statistic, look up the p value and then decide to reject or fail to reject the null hypothesis.

Framework for Hypothesis Testing In this set of slides we apply this framework to comparing the rate calculated from a sample to a hypothesized value.

Assumptions First assumption is that sample observations are independent. If data come from a simple random sample and consist of less than 10% of the population, then the independence assumption is reasonable. Alternatively, if the data come from a random process, we must evaluate the independence condition more carefully. For example, arrival of patients to a hospital may be argued to be random. Patients diseases are independent unless the patients has an infectious disease or there is mass casuality, in which case observing the occurrence of one diseases will raise suspicion that others may be infected.

Assumptions The second assumption is that the distribution of the rate is near normal

Assumptions A rate can be considered the average of observations, if observations are scored as 1 when it succeeds, and 0 otherwise. This average is assumed to have a Normal distribution. The assumption of Normal distribution is reasonable when

Assumptions There are at least 10 successes and 10 failures in our sample. This is called the success-failure condition.

Assumptions The first formula says that the sample size, n, times the probability of success, shown as p, is greater than 10. Here p is the population rate of success. This population rate can be estimated as the sample rate.

Assumptions The second formula says that the sample size, n, times the probability of failure, shown as one minus p, is greater than 10. Here again p is estimated from either the sample rate or from hypothesized population rate.

Hypotheses In our framework for hypothesis testing the next step is to state the hypotheses. The null hypothesis is the probability of success or the rate of observing the event, is a specific value.

Hypotheses The alternative hypothesis, if we are doing a two sided test, is that rate is not the hypothesized null value

Hypotheses The alternative hypothesis, if we are doing a one sided test, is that the rate is more or less than the null value.

Calculate Statistic The third step in our framework for hypothesis testing is to calculate the test statistic. The statistic Z is calculated from the point estimate minus the null value divided by standard error.

Calculate Statistic For sample mean we use

Calculate Statistic the rate of success within the sample.

Calculate Statistic Standard error of the sample rate is calculated as square root of

Calculate Statistic rate of success

Calculate Statistic Times rate of failure

Calculate Statistic Divided by the sample size.

Calculate Statistic Then the statistic Z is calculated using this formula.

Look-up P Value Next step in our inference framework is to look up the p value associated with the calculated Z statistic. As before this is done using Z tables. The Z tables give the area associated with observing a value less than Z. In one sided tests, the p-value is the white area. In two sided tests, the p-value is double the white area.

Make Inference Last step in our framework is to infer from the sample if the population has the hypothesized null value. If the p-value is less than 0.05 or a pre-set level of type 1 error, the null hypothesis is rejected.

Example A random sample of patients eligible to use our hospital indices that 52% use our services. Does this provide convincing evidence (significance level of 95%) for the claim that 50% of eligible patients use our hospital? Let us look at an example. A random sample of patients eligible to use our hospital indices that 52% use our services. Does this provide convincing evidence (at significance level of 95%) for the claim that more than 50% of eligible patients use our hospital?

Assumptions First, we check assumptions. Our first assumption was that the observations in the sample are independent. Since we took a random sample then this is likely, especially if we sampled less than 10% of the population.

Assumptions The second assumption is that the rate of use of our hospital services can be considered an average and this sample average has a near normal distribution.

Assumptions In a one-proportion hypothesis test, the success-failure condition is checked using the null proportion. The hypothesized null value for the proportion is 50% or 0.5.

Assumptions The number of patients who use our services is expected to be 500 times 0.5 or 250, which is higher than 10 required.

Assumptions The same holds for the number of failures. Therefore the success-failure condition is verified. We can approximate the distribution of the rate as near normal distribution.

Hypotheses Next we state the hypotheses. The null hypothesis is that the rate of use of our service is 50%. The alternative hypothesis is that the rate is higher. Notice that these hypotheses require a one sided test.

Calculate Statistic The sample mean was 0.52. The hypothesized value was 0.5 and the sample size was 500. The Z is calculated as 0.89.

Calculate p Value We now look up the p-value associated with a Z of 0.89. This Z score is .8133, which gives us the p-value for the right tail as 0.1867. This is the area marked in blue.

Make Inference Because the p-value of 0.19 is larger than 0.05, we do not reject the null hypothesis.

Take Home Lesson Test population rate In this lecture, we have used our inference framework to see how to test if the population rate is different from a hypothesized value.