220 likes | 390 Views
8.1 – 8.2: Hypotheses tests for two-sample means. Objective: To test claims about inferences for two sample means, under specific conditions. Comparing two means. When comparing two means, our parameter of interest is the difference between the two means, 1 – 2 .
E N D
8.1 – 8.2: Hypotheses tests for two-sample means Objective: To test claims about inferences for two sample means, under specific conditions
Comparing two means • When comparing two means, our parameter of interest is the difference between the two means, 1 – 2. • The catch is that we must be confident that our two samples are completely independent from one anther. • Therefore, our standard deviation can be found by adding the two variances to account for extra variability among the two different samples: • - • We still don’t know the true standard deviations of the two groups, so we need to estimate and use the standard error • -
Comparing two means (cont.) • Because we are working with means and estimating the standard error of their difference using the data, we shouldn’t be surprised that the sampling model is a Student’s t. • The confidence interval we build is called a two-sample t-interval(for the difference in means). • The corresponding hypothesis test is called a two-sample t-test.
Two-sample t-interval and t-test conditions • Independence Assumption (Each condition needs to be checked for both groups.): • Randomization Condition: Were the data collected with suitable randomization (representative random samples or a randomized experiment)? • 10% Condition: We don’t usually check this condition for differences of means. We will check it for means only if we have a very small population or an extremely large sample.
Two-sample t-interval and t-test conditions (cont.) • Normal Population Assumption: • Nearly Normal Condition: This must be checked for both groups. A violation by either one violates the condition. • Independent Groups Assumption: The two groups we are comparing must be independent of each other. (See 8.3 if the groups are not independent of one another…)
Two-sample t-interval • When the conditions are met, we are ready to find the confidence interval for the difference between means of two independent groups, 1 – 2. • The confidence interval is • ) • where the standard error of the difference of the means is • - • The critical value t*df depends on the particular confidence level, C, that you specify and on the number of degrees of freedom, which we get from the sample sizes and a special formula.
Degrees of freedom • The special formula for the degrees of freedom for our t critical value is a bear: • Because of this, we will let technology calculate degrees of freedom for us!
Steps for two-sample t-interval • Check Conditions and show that you have checked these! • Randomization Condition: Were the data collected with suitable randomization (representative random samples or a randomized experiment)? • 10% Condition: Is each sample size less than 10% of the population size? • Nearly Normal Condition: This must be checked for both groups. A violation by either one violates the condition. • Independent Groups Assumption: The two groups we are comparing must be independent of each other.
Steps for two-sample t-interval (cont.) • State the test you are about to conduct • Ex) Two-Sample t-Interval for Means • Calculate your t-interval • State your conclusion IN CONTEXT. • I am 95% confident that the average pulse rate for smokers is between 3.1 and 8.9 bpm higher than the pulse rate for nonsmokers.
Two-sample t-interval Example • Does increasing the amount of calcium in our diet reduce blood pressure? Examination of a large sample of people revealed a relationship between calcium intake and blood pressure. The relationship was strongest for black men. Such observational studies do not establish causation. Researchers therefore designed a randomized comparative experiment. The subjects in part of the experiment were 21 healthy black men. A randomly chosen group of 10 of the men received a calcium supplement for 12 weeks. The control group of 11 men received a placebo pill that looked identical. The experiment was double-blind. The response variable is the decrease in systolic (heart contracted) blood pressure for a subject after 12 weeks, in mm of mercury. An increase appears as a negative response. Take Group 1 to be the calcium group and Group 2 the placebo group. Here are the data for… • The 10 men in Group 1 (calcium): • 7 -4 18 17 -3 -5 1 10 11 -2 • The 11 men in Group 2 (placebo): • -1 12 -1 -3 3 -5 5 2 -11 -1 • -3
Two-sample t-interval Example (cont.) • Set up your hypotheses in words and symbols as if we were to conduct a test. • Check conditions • Create a 90% confidence interval. Can we reject Ho?
Two-sample t-interval calculator tips • Check your last confidence interval with the calculator: • STAT Tests • 0: 2-SampTint • Specify if you are using data (if you have raw data to enter into L1 and L2) or stats (if you have summarized data) • Specify 1 for both frequencies • Pooled? We will discuss this later (for now say NO). • Calculate
Two-sample t-tests • The hypothesis test we use is the two-sample t-test for means. • The conditions for the two-sample t-test for the difference between the means of two independent groups are the same as for the two-sample t-interval.
Two-sample t-tests (cont.) • We test the hypothesis H0:1 – 2 = 0, where the hypothesized difference, 0, is almost always 0, using the statistic • The standard error is • - • When the conditions are met and the null hypothesis is true, this statistic can be closely modeled by a Student’s t-model with a number of degrees of freedom given by a special formula. We use that model to obtain a P-value.
Two-sample t-tests (cont.) • We test the hypothesis H0:1 – 2 = 0, where the hypothesized difference, 0, is almost always 0, using the statistic • The standard error is • - • When the conditions are met and the null hypothesis is true, this statistic can be closely modeled by a Student’s t-model with a number of degrees of freedom given by a special formula. We use that model to obtain a P-value.
Writing hypotheses • There are different ways to write the null hypotheses. You may often times assume they are equal: • H0: 1 – 2 = 0 OR H0: 1= 2 • Thus, the corresponding alternative hypotheses may be one of the following: • HA: 1 – 2≠ 0 OR HA: 1 ≠ 2 • HA: 1 – 2> 0 OR HA: 1> 2 • HA: 1 – 2< 0 OR HA: 1< 2
Steps for two-sample mean Hypothesis testing • Check Conditions and show that you have checked these! • Randomization Condition: Were the data collected with suitable randomization (representative random samples or a randomized experiment)? • 10% Condition: Is each sample size less than 10% of the population size? • Nearly Normal Condition: This must be checked for both groups. A violation by either one violates the condition. • Independent Groups Assumption: The two groups we are comparing must be independent of each other.
Steps for Hypothesis testing (cont.) • State the test you are about to conduct • Ex) Two-Sample t-Test for Means • Set up your hypotheses • H0: • HA: • Calculate your test statistic • Draw a picture of your desired area under the t-model, and calculate your P-value.
Steps for Hypothesis testing (cont.) • Make your conclusion.
Two-Sample Mean hypothesis test example • Using the previous data to compare the calcium supplement and the placebo, calculate the test statistic and P-value to determine if there is enough evidence that calcium reduces blood pressure.
Calculator tips • Given a set of data: • Enter data into L1 • Set up STATPLOT to create a histogram to check the nearly Normal condition • STAT TESTS 2:T-Test • Choose Stored Data, then specify your data list (usually L1) • Enter the mean of the null model and indicate where the data are (>, <, or ) • Given sample mean and standard deviation: • STAT TESTS 2:T-Test • Choose Stats enter • Specify the hypothesized mean and sample statistics • Specify the tail (>, <, or ) • Calculate
Assignments • Day 1: 8.1-8.2 Book Page # 2 – 6 EVEN, 7, 9 • Day 2: 8.1-8.2 Book Page # 10, 11, 19, 25, 36