• No results found

Neshey's Revisited

In the following challenge you will revisit an earlier problem, this time solving it with the p-value method.

You are the plant manager of a Neshey's chocolate factory. The shop was flooded during the recent storms. The machine that wraps Neshey's popular chocolate confection, Smooches, still works, but you are afraid it may not be working at its former capacity.

If the machine isn't working at top capacity, you will need to have it replaced.

The hourly output of the machine is normally distributed. Before the flood, the machine wrapped an average of 340 Smooches per hour. Over the first week after the flood, you counted wrapped

Smooches during 32 randomly selected one-hour periods. The machine averaged 318 Smooches per hour, with a standard deviation of 44.

You conduct a one-sided hypothesis test using a 95% confidence level. According to your calculations, you should:

a. Replace the machine.

This is the best answer. The p-value is less than the significance level of 0.05. You reject the null hypothesis that the machine's performance is not impaired.

This is not the best answer. At the 0.05 significance level, the data suggest that the machine's performance has been impaired.

Utility for Single Populations Excel

z-table

The null hypothesis is that the population mean is no lower than 340. The alternative hypothesis is that the population mean is now less than 340. You are using a one-tailed test, and you are assuming that the new population mean is lower than the population mean before the flood.

Identify the values of the relevant quantities. Use the appropriate formula and calculate the z-value. The z-value is -2.83.

This z-value corresponds to a left-tail probability of 0.0023. This is the tail you are interested in, since you are conducting a one-sided to test to see if the actual population mean is less than it was in the past. This tail probability is the p-value.

Since the p-value is less than the significance level, you reject the null hypothesis that the population mean is unchanged. Moreover, you now can say that you are rejecting the null hypothesis at the 0.0023 level of significance. You should replace the machine.

Comparing Two Populations

Now satisfied with your analysis of the restaurant, Leo asks you to compare the discretionary spending habits of two categories of guests: leisure and business.

Leisure Guests vs. Business Guests: Who spends more?

Every hotel manager wrestles with the problem of stretching limited marketing resources. I want to make sure that I'm wisely allocating each marketing dollar.

Leisure guests, such as tourists and honeymooners, are especially attracted to Hawaii. Also, many professional associations like to have their conventions here, so our islands attract business travelers, who mix business and pleasure.

Business travelers pay lower room prices because conferences book rooms in bulk. Bulk reservations are good for me because they keep my occupancy levels high.

However, I don't have a good sense of whether the discretionary spending of my business guests is different from that of my leisure guests: they may take fewer scuba lessons but use the spa services more, for example.

Can you help me figure out whether there is any significant difference between leisure and business travelers' discretionary spending habits? Your conclusions might influence my marketing efforts. I collected two random samples: one of leisure guests and one of business guests. Not including room, meal, and beverage charges leisure travelers spent an average of $75 a day, compared to $64 a day for the business travelers.

I knew that the difference between the two averages of the two samples could be due to chance, so I thought I'd have you do a hypothesis test to find out.

When I was compiling the data for you, I realized that my samples were of different sizes. I was able to get 85 leisure guests to respond, but only 76 business guests returned my survey.

Which figure will you use as the sample size? Or will you add them together?

I also realized that with these data, you'd have to calculate two sample standard deviations, one for each sample. How do you go about solving a problem like this?

Using Hypothesis Tests to Compare Two Population Means How do you test whether two populations have different means?

So far, we've used hypothesis tests to study the mean or proportion of a single population. Often, managers want to compare the means or proportions of two different populations: in this case, we use a two-population hypothesis test. Let's clarify when we use each type of test.

We conduct single-population tests when we have an initial value for a population mean and want to test to see if it is correct. Single population tests are especially useful when we suspect that the population mean has changed. For example, we use a single-population test when we know the historical average of a population and want to test whether that historical average has changed.

We conduct two-population tests to compare a characteristic of two groups for which we have access to sample data for each group. For example, we'd use a two-population test to study which of two

educational software packages better prepares students for the GMAT. Do the students using package 1 perform better on the GMAT than the students using package 2?

In two-population tests, we take two samples, one from each population. For each sample, we calculate the sample mean, standard deviation, and sample size.

We can then use the two sets of sample data to test claims about differences between the two populations. For example, when we want to know whether two populations have different means, we formulate a null hypothesis stating that the means are not different: the first population mean is equal to the second.

Let's look at the GMAT software package example more closely. The manager of one educational software company might wonder if the average GMAT score of students using her software is different from the average GMAT score of students using the competitor's software.

Since the manager only wants to test if the average GMAT scores are different, she conducts a two-sided hypothesis test for two populations. The null hypothesis states that there is no difference between the average GMAT scores of the students who use the two companies' software.

The alternative hypothesis states that the average GMAT scores of the students who use the two companies' software are different.

We denote the average scores of the two populations by the Greek letter mu and distinguish them with subscripts. Our hypotheses are:

To be 95% confident in the result of the test, we use a significance level of 0.05.

We collect two samples, one from each population. We denote the sample means with the familiar x-bar, which we again distinguish with subscripts.

We are able to collect the GMAT scores of 45 people who used the company's software, and 36 people who used the competitor's software. As we will see shortly, the different sample sizes will not pose a problem.

The respective sample means are 650 and 630, and the standard deviations are 60 and 50.

Could the two random samples we picked just happen to have different means by chance but really have come from populations that have the same population means?

The null hypothesis states that there is no difference in the two population means. As with single- population tests, we test the null hypothesis by asking how likely it would be to produce the sample results if the null hypothesis is in fact true.

That is, if the average GMAT scores for students using the two different software packages actually are the same, what is the chance that two samples we collect would have sample means as different as 650 and 630?

Our intuition tells us that the greater the difference between the means of the two samples, the more likely it is that the samples came from different populations. But how do we know when the numerical difference is large enough to be statistically significant? When do we have enough evidence to actually conclude that the two populations must be different?

means, incorporating the data from both populations. It looks a bit complicated:

Let's compute the z-value for our example. Since we assume that the null hypothesis is true, we have: Using the formula, we find that the z-value is 1.64.

For a two-sided test, a z-value of 1.64 translates into a probability in one tail of 0.05, and thus a p-value of 0.10.

Since this p-value is greater than the significance level of 0.05, we cannot reject the null hypothesis. In other words, the high p-value tells us that there is insufficient evidence from the two samples to conclude that the average GMAT score of the students who use the company's software is different from the average GMAT score of students who use the competitor's software.

Two-population hypothesis tests can be performed using the formula shown above, or you can click here to access the Excel utility for hypothesis testing.

Summary

In a hypothesis test for two population means, we assume a null hypothesis: that the two population means are equal. We collect a sample from each population and calculate its sample statistics. We calculate a p-value for the difference between the two samples. If the p-value is less than the significance level, we reject the null hypothesis.

Hypothesis Tests for Two Population Proportions

Often, managers want to know if two population proportions are equal. For example, a marketing manager of a packaged snack foods company might want to compare the snack food habits of different states in the US.

The marketing manager might think that the proportion of consumers who favor potato chips in Texas is different from the proportion of consumers who favor potato chips in Oklahoma.

Comparing two population proportions is similar to comparing two population means. We have two populations: the null hypothesis states that their proportions are the same; the alternative hypothesis states that they are different.

We collect a sample from each population and calculate its sample size and sample proportion. As in the single population proportion test, we don't need to find the sample standard deviation, since we know that the population standard deviation is the square root of

[p*(1 - p)].

Similarly to the hypothesis tests for comparing two population means, we calculate a z-value for the difference between the proportions using the formula below:

We translate the z-value into a p-value just as we would for any other type of hypothesis test. If the p- value is less than our significance level, we reject the null hypothesis and conclude that the proportions are different. If the p-value is greater than the significance level, we do not reject the null hypothesis. Optional Example

Let's take a closer look at the study of snacking habits in Texas and Oklahoma.

The manager does not wish to test for a particular direction of difference; he just wants to know if the proportions are different. Thus, he should use a two-sided test.

The marketing manager wants to be 95% confident in the result of this test, so the significance level is 0.05.

Suppose we collect responses from 400 people in Texas and 225 people in Oklahoma. The sample proportions are 45% and 35%, respectively.

Could the two random samples we picked just happen to have different sample proportions? That is, if the true proportions of Texans and Oklahomans favoring potato chips actually are the same, what

would be the chance that the sample proportions are 45% and 35% respectively?

We use p-values to answer this question. First, we calculate a z-value for the difference of the sample proportions that incorporates the data from both populations. The null hypothesis states that the population proportions are equal, so their difference is 0.

The z-value is 2.48.

For a two-sided test, a z-value of 2.48 translates into a probability in one tail of 0.0065 and hence a p-value of 0.013.

Since this p-value is less than the significance level of 0.05, we can reject the null hypothesis. In other words, the low p-value tells us that there is sufficient evidence from the samples to conclude that there is a difference between the proportions of Texan and Oklahoman potato chip lovers. We can make this claim at a 0.013 level of significance.

Two-population hypothesis tests for population proportions can be performed using the formula shown above, or you can click here to access the Excel utility for hypothesis testing.

Summary

In a hypothesis test for two population proportions, we assume a null hypothesis: the two population proportions are equal. We collect two samples and calculate the sample proportions. We calculate a p-value for the difference between the sample proportions. If the p-value is less than the

significance level, we reject the null hypothesis. Excel Utility (Two Populations)

Click here to open an Excel Utility that allows you to perform hypothesis tests for two populations. Make sure you do at least one example by hand to ensure you thoroughly understand the basic concepts before using the utility. You should enter data only in the yellow input areas of the utility. To ensure you are using the utility correctly, try to reproduce the results for the GMAT and potato chip examples.

Solving the Leisure vs. Business Guest Spending Problem

Two-population hypothesis tests help you determine whether two populations have different means. You use a two-population test to solve Leo's problem.

You have to find out if leisure guests' average daily discretionary spending is different from business guests' average daily discretionary spending.

Leo has provided these data:

Now it's time to state the null hypothesis. The best formulation is:

a. There is no difference between business and leisure guests' mean spending.

This is the best answer. You want to know if two means are different, not if they differ in one particular direction. If Leo had asked you to conduct a test to learn only if business guests' spending was greater than that of leisure guests, the second answer would be correct.

b. On average, business guests' spending is less than leisure guests' spending.

This is not the best answer. You want to know if two means are different, so the null hypothesis states that they are not different.

c. The average difference between business and leisure guests' spending is $11.

This is not the best answer. We never use the summary statistics from the sample to formulate our hypotheses; the hypotheses must be specified before the samples are collected.

You want to find out if the means of two populations — average spending by leisure guests vs. average spending by business guests — are different. The two samples from those populations have different means: $75 and $64, respectively.

The samples may come from populations with the same means, and the numerical difference is due to chance in getting these particular samples. It could be that the first sample just happened to have a high mean and the second sample just happened to have a lower mean.

You test the null hypothesis that the population means have the same value.

You make note of your null hypothesis and the corresponding alternative hypothesis. You use a two-sided test because you don't have any reason to believe that one type of guest spends more than the other. At Leo's request you do a p-value test using a significance level of 0.05. To calculate the p-value, you first find the z-value.

Enter the z-value as a decimal number with 2 digits to the right of the decimal, (e.g., enter "5" as "5.00"). Round if necessary. a. 2.10 b. 2.11 c. 2.12 d. -2.10 e. -2.11 f. -2.12 z-table

Utility for Two Populations

The z-value is +2.12 or -2.12, depending on how you set up the difference, i.e., in what order you subtract the sample means. Either way, the final conclusion will be the same.

You use the z-value to calculate the p-value. The p-value is: a. 0.017

This is not the correct answer. Remember that for a two-sided test, you must calculate both tail probabilities. b. 0.034

This is the correct answer. For a two-sided test, you calculate both tail probabilities. c. 0.051

This is not the correct answer. For a two-sided test, you calculate the probabilities in both tails to get the p-value.

z-table

Utility for Two Populations

A z-value of 2.12 has a cumulative probability of 0.9830. You subtract this probability from the total probability, 1, for a right-tail probability of 0.017.

Because we are doing a two-side test, we want to measure the probability of extreme values on both sides. Thus, we double 0.017 to get a p-value of 0.034.

Since the p-value 0.034 is less than the significance level 0.05, you recommend to Leo that he reject the null hypothesis. The average daily discretionary spending per person is different for leisure and business guests.

Leo reads your report:

I see. We can tell if two population means are different by running a hypothesis test on their difference. We test the null hypothesis that there is no difference.

As you see, the p-value is less than the significance level. This tells you that...

...the difference in the two sample means is probably not due to chance. The spending habits of the two types of guests are different. Got it.