Top Banner
Topics 21 - 23
35

Topics 21 - 23. Topic 21 Comparing Two Proportion.

Apr 01, 2015

Download

Documents

Chasity Bolas
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topics 21 - 23

Page 2: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 21

Comparing Two Proportion

Page 3: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22

Comparing Two Means

Page 4: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22 - Confidence Interval: Comparing two Mean

The estimated standard deviation of the sample statistic X-bar is called the standard error

The purpose of confidence intervals is to use the sample statistic to construct an interval of values that you can be reasonably confident contains the actual, though unknown, parameter.

2

22

1

21*

21error ofmargin estimaten

s

n

stXX

Confidence Interval for a population proportion :

where n >= 30

t * is calculated based on level of confidence

When running for example 95% Confidence Interval: 95% is called Confidence Level and we are allowing possible 5% for error, we call this alpha (α )= 5% where α is the significant level

2

22

1

21

n

s

n

s

Page 5: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22 - Confidence Interval: Comparing two Mean

Use if the sample data is given, use the Stat, Edit and enter data in the calculator before running the Confidence Interval

L1 and L2 is where data is entered by you

C-Level: is the level you are running the Confidence Interval

Use if the information about sample data is given.

X-Bar mean of sample dataSx is Standard deviation of the samplen is sample size

C-Level: is the level you are running the Confidence Interval

Page 6: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22 – Test of Significant: Comparing two Mean

The purpose of Test of Significant is when we do know the population Parameter but we do not necessary agree with it or we have question about it. To do the test we need to run a sample and we use the statistic to test its validity.

Step 2: we initiate hypothesis regarding the question – we can not run test of significant without establishing the hypothesis

21

21

21

210

:

:

or

orH

H

a

Step 3: Decide what test we have to run, in case of proportion, we use t-test

2

22

1

21

21

ns

ns

xxt

Step 1: Identify and define the parameter.

Page 7: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22 – Test of Significant: Comparing two Mean

Step 4: Run the test from calculator

Step 5: From the calculator write down the p-value T-test

Step 6: Compare your p-value with α – alpha – Significant Level

If p-value is smaller than α we “reject” the null hypothesis, then it is statistically significant based on data.

If p-value is greater than the α we “Fail to reject” the null hypothesis, then it is not statistically significant based on data.

Last step: we write conclusion based on step 6 at significant level α

• p- value > 0.1: little or no evidence against H0 • 0.05 < p- value <= 0.10: some evidence against H0 • 0.01 < p- value <= 0.05: moderate evidence against H0 • 0.001 < p- value <= 0.01: strong evidence against H0 • p- value <= 0.001: very strong evidence against H0

Page 8: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 22 – Test of Significant: Comparing two Mean

Use if the sample data is given, use the Stat, Edit and enter data in the calculator before running the T-test

µ0 is mean–value in questionList: L1 where the raw data is entered by you

µ: is the alternative hypothesis

Use if the information about sample data is given.

µ0 is mean–value in questionX-bar is sample meanSx is Sample Standard deviationn is sample sizeµ: is the alternative hypothesis

Page 9: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close FriendsRecall from Activity 19- 17 that one of the questions asked of a

random sample of adult Americans in the 2004 General Social Survey was, “ From time to time, most people discuss important matters with other people. Looking back over the last six months— who are the people with whom you discussed matters important to you? Just tell me their first names or initials.” The interviewer then recorded how many names or initials the respondent mentioned. Suppose you want to examine whether men and women differ with regard to how many names they tend to mention. ( For convenience, we will refer to those named as “ close friends.”)

a. Is this an observational study or an experiment? Explain.

b. Identify the explanatory and response variable for this study. Also classify each variable as categorical ( also binary) or quantitative. Explanatory: Type: Response: Type:

a. This is an observational study because the researcher simply observed the gender of each subject—he/she did not randomly assign gender to subjects.

b. Explanatory: gender Type: binary categorical Response: number of “close friends” Type: quantitative

Page 10: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close Friends (Cont)

c. State the null and alternative hypotheses, in symbols and in words, for testing whether the sample data provide evidence that men and women differ with regard to the average number of close friends they tend to mention in response to this question.

c. The null hypothesis is men and women tend to mention the same average number of close friends in response to this question. In symbols, H 0 : µ m = µf . The alternative hypothesis is men and women differ in the average number of close friends they tend to mention in response to this question. In symbols, H a : µm ≠ µf .

Page 11: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close Friends (Cont)Before you learn a new test procedure for handling this

situation, let’s begin with a preliminary analysis of the data. Sample responses by gender are tallied in the following table: (look at the book)

Some descriptive summaries follow: (book)

e. Are these values parameters or statistics? Explain.

f. Produce box plots ( on the same scale) to compare the distributions of the number of close friends between males and females.

g. Comment on any differences that you observe in the distributions of the number of close friends between males and females.

h. Would it be possible to obtain sample means this far apart even if the population means were equal? Explain.

Page 12: Topics 21 - 23. Topic 21 Comparing Two Proportion.

e. These values are statistics because they describe samples, not populations.

f. The following boxplots compare the distributions of the number of close friends:

g. There are very few differences in the distributions of the number of close friends mentioned between males and females. The males have a slightly lower mean, median, and lower quartile, but the upper quartiles and maximums are identical to those of females.

h. Yes, it would be possible to obtain sample means this far apart even if the population means were equal.

Page 13: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Once again, because of sampling variability, you cannot conclude that simply because these sample means differ, the means of the respective populations must differ as well. As always, you can use a test of significance to establish whether a sample result ( in this case, the observed difference in sample mean number of close friends) is “ significant” in the sense of being unlikely to have occurred by chance ( from random sampling) alone.

Also, you can use a confidence interval to estimate the magnitude of the difference in the population means.

Inference procedures for comparing the population means of two different groups are similar to those for comparing population proportions in that they take into account sample information from both groups. These procedures are similar to those for a single population mean in that they use the t- distribution, and the sample sizes, sample means, and sample standard deviations are the relevant summary statistics. The details for conducting confidence intervals and significance tests concerning the difference between two population means, which will be denoted by µ1 and µ2 , are presented here.

Page 14: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Notes • As always, the symbols x-bar and s represent a sample mean and a sample standard deviation, respectively.

The subscripts indicate the population from which the observational units are randomly selected or the treatment group to which they are randomly assigned.

• The structure, reasoning, and interpretation of this test and interval procedure are the same as for other tests and intervals that you have studied.

Page 15: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Two- sample t- procedures

Two- sample t- procedures apply to scenarios involving random sampling from two populations and/ or random assignment to two treatment groups. As before, the calculations are identical, but the scope of conclusions is very different for these two scenarios.

The degrees of freedom convention being used is a conservative approximation, meaning the degrees of freedom is on the low side, so the critical value will be slightly greater than it needs to be; thus the interval will be slightly wider and, therefore, will succeed in capturing µ1 - µ2 slightly more often than the confidence level indicates.

When using technology, a more exact critical value will be computed for you. The p- value calculation can also differ a bit with technology, again based on the degrees of freedom.

Page 16: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close Friends (Cont)

i. Use the summary statistics provided after part d to calculate the test statistic for testing the hypotheses you stated in part c.

j. Use Table III ( t- Distribution Critical Values) to find ( as accurately as possible) the p- value of the test.

k. Which of the following is a correct interpretation of the p- value?

• The p- value is the probability that males and females have the same mean number of close friends in these samples.

• The p- value is the probability that males and females have the same mean number of close friends in the populations.

• The p- value is the probability that males have a higher mean number of close friends than females do.

• The p- value is the probability of getting sample data so extreme if, in fact, males and females have the same mean number of close friends in the populations.

Page 17: Topics 21 - 23. Topic 21 Comparing Two Proportion.

IJK

i. The test statistic is t = 2.45.

j. Using 500 degrees of freedom, p-value = XX

k. The correct interpretation of the p-value is “The p-value is the probability of getting sample data so extreme if, in fact, males and females have the same mean number of close friends in the populations.”

Page 18: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close Friends (Cont)

l. Is this p- value small enough to reject the null hypothesis that these population means are equal at the .05 significance level?

m. Is the observed difference in sample means statistically significant at the .01 level?

n. State the technical conditions necessary for this procedure to be valid. Does the strong skewness in the sample data provide any reason to doubt the validity of this test?

Page 19: Topics 21 - 23. Topic 21 Comparing Two Proportion.

LMN

l. Yes, this p-value is small enough to reject the null hypothesis at the alpha = .05 significance level (p-value = xxx).

m. No, the observed difference in sample means is not statistically significant at the alpha = .01 significance level (p-value = XXX).

n. Technical conditions: i. The data are a random sample broken into two distinct groups (see page 418). ii. Both sample size are large (greater than 30). Because both sample sizes are large, you do not need to worry about the strong skewness in the sample data. It does not provide any reason to doubt the validity of this test.

Page 20: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22-1 Close Friends (Cont)

o. Determine and interpret a 95% confidence interval for the difference in population means µf - µm .

Hint: Be sure to comment on whether the interval is entirely negative, entirely positive, or contains zero. Also explain the importance of whether the interval includes zero.

o. For a 95% CI for µf - µm with 500 degrees of freedom, you calculate (0.045, 0.411). This interval is entirely positive (and does not include zero), which means you can be 95% confident that the mean number of close friends that women have is between .045 and .411 greater than the mean number of close friends that men have.

Page 21: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Watch Out

Remember that failing to reject a null hypothesis is not the same as accepting it.

You do not have enough evidence to conclude that one route is faster than the other on average for Alex, but you should not conclude that the average commuting times are identical for the two routes.

Larger samples might produce a statistically significant difference.

Page 22: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22- 2: Hypothetical Commuting TimesSuppose Alex wants to determine which of two possible driving routes gets him to school more quickly. Also suppose that over a period of 20 days, he randomly decides which route to drive each day. He then records the commuting times ( in minutes) and displays them as follows: Route 1 19.3 20.5 23.0 25.8 28.0 28.8 30.6 32.1 33.5 38.4 Route 2 23.7 24.5 27.7 30.0 31.9 32.5 32.6 35.5 38.7 42.9

a. Does one route always get Alex to school more quickly than the other?

b. Do the data suggest that one route tends to get Alex to school more quickly than the other? If so, which route appears to be quicker?

c. Complete the table below

d. hypothesis, t and p-valueSize Mean SD P-Value

Alex Route 1

Alex Route 2

Page 23: Topics 21 - 23. Topic 21 Comparing Two Proportion.

a. No, one route does not always get Alex to school more quickly than the other.

b. Yes, the data suggest that Route 1 tends to get Alex to school more quickly than Route 2.

c. Here is the completed table:

d. H 0 : µ 1 = µ2 H a : µ1 ≠ µ2 t = -1.49, the p-value is .1702

Page 24: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 22- 2: Hypothetical Commuting Times (cont)e. Are Alex’s data statistically significant at any of the

commonly used significance levels? Can Alex reasonably conclude that one route is faster than the other route for getting to school? Explain.

f. Use technology to calculate a 90% confidence interval for the difference in Alex’s mean commuting times between route 1 and route 2. Record the confidence interval.

g. Does this interval include the value zero? Explain the importance of this.

e. No, Alex’s data are not statistically significant at any of the commonly used significance levels. Alex cannot reasonably conclude that one route is faster than the other route for getting to school because his p-value is not small and will not allow you to reject the null hypothesis that the average time required for both routes is the same.

f. (8.92, 0.92). g. Yes, this interval includes the value zero. This means that zero is a

plausible value for the difference in the population means or that you cannot conclude there is a difference in the population mean travel times (with 90% confidence).

Page 25: Topics 21 - 23. Topic 21 Comparing Two Proportion.

k. For each commuter ( Barb, Carl, and Donna), use technology to conduct a significance test of whether the difference in his or her sample mean commuting times is statistically significant. Record the p- values of these tests in the following table, along with the appropriate sample statistics:

Size Mean SD P-Value

Barb: Route 1

Barb: Route 2

Carl: Route 1

Carl: Route 2

Donna: Route 1

Donna: Route 2

Page 26: Topics 21 - 23. Topic 21 Comparing Two Proportion.

These comparisons should help you to see the roles of sample sizes, means, and standard deviations in the two- sample t- test. All else being the same, the test result becomes more statistically significant ( i. e., the p- value becomes smaller) as

• The difference in sample means increases

• The sample sizes increase

• The sample standard deviations decrease

Note that the researcher has no control over the sample means but can determine the sample sizes.

Larger samples are better, but they require more time and expense. The researcher seems to have no control over the standard deviations, but this third bullet reveals why statisticians like to reduce variability as much as possible ( for example, using better measurement tools).

Page 27: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Watch Out (cont)

Always remember to check technical conditions before taking a test or interval result seriously. Also notice that the second technical condition here is an either/ or statement: the distributions do not have to be normal if the sample sizes are large.

Remember the scope of conclusions, with regard to causation and generalizability, depends on how the study is conducted.

Do not forget to relate your conclusions to the context of the study. Do not simply say “ reject H0 ” and leave it at that. Such a conclusion would not be very helpful

Page 28: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 23

Analyzing Paired Data

Page 29: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Activity 23-1: Marriage Ages – page 498

Page 30: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Matched Pair Analysis – Page 503, 500

Page 31: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 23 - Confidence Interval: Mean, σ is unknown

The estimated standard deviation of the sample statistic X-bar is called the standard error

n

sd

The purpose of confidence intervals is to use the sample statistic to construct an interval of values that you can be reasonably confident contains the actual, though unknown, parameter.

n

stX d

d*error ofmargin estimate

Confidence Interval for a population proportion :

where n >= 30

t * is calculated based on level of confidence

When running for example 95% Confidence Interval: 95% is called Confidence Level and we are allowing possible 5% for error, we call this alpha (α )= 5% where α is the significant level

Page 32: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 23 - Confidence Interval: Mean, σ is unknown

Use if the sample data is given, use the Stat, Edit and enter data in the calculator before running the Confidence Interval

L1 is where data is entered by you

C-Level: is the level you are running the Confidence Interval

Use if the information about sample data is given.

X-Bar mean of sample dataSx is Standard deviation of the samplen is sample size

C-Level: is the level you are running the Confidence Interval

Page 33: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 23 – Test of Significant: MeanThe purpose of Test of Significant is when we do know the population Parameter but we do not necessary agree with it or we have question about it. To do the test we need to run a sample and we use the statistic to test its validity.

Step 2: we initiate hypothesis regarding the question – we can not run test of significant without establishing the hypothesis

0

0

0:

0:0

or

orH

H

a

Step 3: Decide what test we have to run, in case of proportion, we use t-test

n

s

xt

d

d

Step 1: Identify and define the parameter.

Page 34: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Topic 23 – Test of Significant: Mean

Step 4: Run the test from calculator

Step 5: From the calculator write down the p-value T-test

Step 6: Compare your p-value with α – alpha – Significant Level

If p-value is smaller than α we “reject” the null hypothesis, then it is statistically significant based on data.

If p-value is greater than the α we “Fail to reject” the null hypothesis, then it is not statistically significant based on data.

Last step: we write conclusion based on step 6 at significant level α

• p- value > 0.1: little or no evidence against H0 • 0.05 < p- value <= 0.10: some evidence against H0 • 0.01 < p- value <= 0.05: moderate evidence against H0 • 0.001 < p- value <= 0.01: strong evidence against H0 • p- value <= 0.001: very strong evidence against H0

Page 35: Topics 21 - 23. Topic 21 Comparing Two Proportion.

Exercise 23-6: Cow Milking – Page 508

Exercise 23-17: Mice Cooling – Page 511

Exercise 23-19: Exam Score Improvement - Page 512

Exercise 23-20: Exam Score Improvement - Page 513