lecture5 applied econometrics and economic modeling

46
Confidence Interval for a Mean

Upload: stone55

Post on 03-Dec-2014

1.453 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Lecture5 Applied Econometrics and Economic Modeling

Confidence Interval for a Mean

Page 2: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

SANDWICH1.XLS This file contains the results of a survey done by a fast

food restaurant. The restaurant recently added a new sandwich to its menu. They conducted a survey to estimate the popularity of this sandwich.

A random sample of 40 customers who ordered the sandwich were surveyed. They were each asked to rate the sandwich from 1 to 10, 10 being best.

The manager wants to estimate the mean satisfaction rating over the entire population of customers by using a 95% confidence interval. How should she proceed?

Page 3: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

New Sandwich Data

Page 4: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

The t Distribution

The t distribution is a close relative of the normal distribution that appears in a variety of statistical applications.

The “degrees of freedom” is a numerical parameter of the t distribution that defines the precise shape of the distribution.

The only difference between the t distribution and the normal distribution is that it is a little more spread out and this increase in spread is greater for the small degrees of freedom.

Page 5: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

This file contains the sample calculations that illustrate the TDIST and TINV functions.

Details to using the TDIST function

– Its first argument must be nonnegative.

– Unlike the NORMDIST function, it returns the probability to the right of the first argument.

– Its third argument is either 1 or 2 and indicates the number of tails. By using 1 for this argument, we get the probability in the right-hand tail only.

TDIST.XLS

Page 6: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

The t Distribution -- continued Details of using the TINV function:

– The first argument is the total probability we want in both tails - half of this goes in the right-hand tail and half goes in the left-hand tail.

– Unlike the TDIST function, there is no third argument for the TINV function.

The t distribution is used when we want to make inferences about a population mean and the population standard deviation is unknown.

Two other close relatives of the normal distribution are the chi-square and F distribution.

Page 7: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Confidence Intervals and Levels

To obtain a confidence interval for the population mean, we first specify a confidence level, usually 90%, 95%, or 99%.

We then use the sampling distribution of the point estimate to determine the multiple of the standard error we need to go out on either side of the point estimate to achieve the given confidence level.

To estimate confidence intervals we use the One-Sample procedure in Excel’s StatPro add-in.

Page 8: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculation

The manager must use StatPro’s One-Sample procedures on the Satisfaction variable.

To use the procedure place the cursor anywhere in the data set and select StatPro/Statistical Inference/One-Sample Analysis menu item.

In the succeeding dialog boxes, select Satisfaction as the variable that you want to analyze and then accept the defaults from there on.

Page 9: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Results

The results of the calculation are:

– The best guess for the population mean rating is 6.250, the sample average in cell F7.

– A 95% confidence interval for the population mean rating extends from 5.739 to 6.761.

Thus, the manager can be 95% confident that the true mean rating over all customers who might try the sandwich is within this interval.

Page 10: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Assumptions We might question whether the sample is really a random

sample matters.

– The manager may have selected random customers but more likely she selected 40 consecutive customer. This type of sample is called a convenience sample. If there isn’t a reason to assume these 40 differ in any way from the entire population, then it is safe to assume them as a random sample.

Another assumption is that the population distribution is normal.

– This is probably not a problem because confidence intervals based on the t distribution are robust to violations of normality. This means that the resulting confidence intervals are valid for any populations that are approximately normal.

Page 11: Lecture5 Applied Econometrics and Economic Modeling

Confidence Interval for a Proportion

Page 12: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information The fast food manager from Example 9.1 has already sampled

40 customers to estimate the population mean rating of its new sandwich.

Recall that each rating is on a scale of 1 to 10, 10 being best.

The manager would now like to use the same sample to estimate the proportion of customer who rate the sandwich at least 6.

Her thinking is that these are the customers who are likely to purchase the sandwich again.

Page 13: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

SANDWICH2.XLS

This file contains the solution.

To create this output, we first had to create the High_rating variable in column C.

– This variable is a 1 for all ratings 6 or larger and 0 is otherwise.

– We can create this variable with the IF function or the StatPro/Data Utilities/Create Dummy Variables menu item.

The confidence interval is formed in rows 14-18 with formulas and a check of them with the One-Sample Procedure is in rows 6-11.

Page 14: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Results

Page 15: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Results -- continued The comparison of the two show slight differences but

these are negligible for large sample sizes.

The output is fairly good news for the manager.

Based on this sample of size 40, she can be 95% confident that the percentage of all customers who would rate the sandwich 6 or higher is somewhere between 47.5% and 77.5%.

This is a large interval so there is a lot of uncertainty. To reduce this interval the manager would have to sample more customers.

Page 16: Lecture5 Applied Econometrics and Economic Modeling

Confidence Interval for a

Standard Deviation

Page 17: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information A machine produces parts that are supposed to have

diameter 10 centimeters.

However, due to inherent variability, some diameters are greater than 10 cm and some are less.

The production supervisor is concerned with two things:

– First, he is concerned that the mean diameter might not be 10 centimeters.

– Second, he is worried about the extent of variability in the diameters.

Page 18: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information -- continued Even if the mean is on target, excessive variability

implies that many of the parts will fail to meet specifications.

To analyze the process, he randomly samples 50 parts during the course of a day and measures the diameter of each part to the nearest millimeter.

Page 19: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

PARTS.XLS

This file shows the sample results in columns A and B.

Should the production supervisor be concerned about the results from this sample?

Page 20: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Results

Page 21: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations Because he is concerned about the mean and the

standard deviation of diameters, we obtain 95% confidence intervals for both.

– This is easy with StatPro’s One-Sample procedure.

– The procedure is the same as before except this time we check the boxes for both confidence interval options - mean and standard deviation.

The confidence interval for the mean extends from 9.986 cm to 10.005 cm. Thus, the supervisor can be fairly confident that the mean diameter all parts is close to 10 cm.

Page 22: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations -- continued

The confidence interval for the standard deviation extends from 0.029 cm to 0.043 cm. Is this good or bad?

Lets assume the diameter is right on target at 10 cm, the standard deviation is at the upper limit, 0.043, and the population distribution is normal. The formula in cell F26 is

=NORMDIST(10-MacDev,Mean,StDev,1)+(1-NORMDIST(10+MaxDev,Mean,StDev,1))

This shows that 13.1% of the parts are unusable.

Page 23: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations -- continued To pursue this analysis further we form a two-way data

table.

Each value in the data table is the resulting proportion of unusable parts.

The best-case scenario (where the mean is close to the target and the standard deviation is small) still results in 2.5% unusable parts.

The message for the supervisor should be clear - he must work to reduce the underlying variability in the process.

Page 24: Lecture5 Applied Econometrics and Economic Modeling

Confidence Interval for the Difference Between

Means

Page 25: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information

The SureStep Company manufactures high-quality treadmills for use in exercise clubs.

SureSteps currently purchases its motors for these treadmills from supplier A.

However, it is considering a change to supplier B, which offers a slightly lower cost. The only question is whether supplier B’s motors are as reliable as supplier A’s.

Page 26: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information -- continued To check this SureStep installs motors from supplier

A on 30 of its treadmills and motors from supplier B on another 30 of its treadmills.

It then runs these treadmills under typical conditions and, for each treadmill, records the number of hours until the motor fails.

What can SureStep conclude?

Page 27: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

MOTORS.XLS The data from the experiment appears in this file. Here is a portion of that

data.

Page 28: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Boxplots

In any comparison problem it is a good idea to look initially at side-by-side boxplots of the two samples.

Page 29: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Boxplots -- continued

The boxplots show

– the distribution of times until failure are skewed to the right for each supplier

– the mean for supplier A is somewhat greater than the mean for supplier B

– there are several mild outliers

There seems to be little doubt that supplier A’s motors will last longer on average than supplier B’s - or is there?

Page 30: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Confidence Interval

A confidence interval for the mean difference allows us to see whether the differences apparent in the boxplots can be generalized to all motors from the two suppliers.

We find this confidence interval by using StatPro Two-Sample procedure.

It shows that the sample means differ by approximately 93 hours and that the sample standard deviations are of roughly the same magnitude.

Page 31: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Confidence Interval -- continued The difference between sample means is 93.133 hours, the

pooled estimate of the common population standard deviation is 272.196 hours, the standard error of the sample mean difference is 70.281 hours; these values lead to the following 95% confidence interval for the mean difference: 47.549 to 233.815.

Not only is this interval wide but it ranges from a negative value to a positive value.

If SureStep has to guess they would say that supplier A’s motors lasted longer, but because of the negative number there is still a possibility that the opposite is true.

Page 32: Lecture5 Applied Econometrics and Economic Modeling

Confidence Interval for the Difference

Between Proportions

Page 33: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information

An appliance store is about to run a big sale.

It selects 300 of its best customers and randomly divides them into two sets of 150 customers each.

It then mails a notice of the sale to all 300 customers but includes a coupon for an extra 5% off the sale price to the second set of customers only.

As the sale progresses, the store keeps track of which of these customers purchase appliances.

Page 34: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

COUPONS.XLS The data from the sale are recorded in this file.

What can the store’s manager conclude about the effectiveness of the coupons?

Page 35: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Solution The data has been arranged in a “contingency” table.

Of the 150 customers who received coupons, 55 purchased an appliance.

Of the 150 who did not receive coupons, only 35 purchased an appliance.

These translate to the sample proportions 0.3667 and 0.2333, calculated in cells B8 and B9 with the formula=B4/D4 and =B5/D5. By subtraction these lead directly to the sample difference between proportions, 0.1333, in cell B11.

Page 36: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Solution -- continued The standard error of this difference is calculated in cell

B12 with the formula =SQRT(SampProp1*(1-SampProp1)/SampSize1 +SampProp2*(1-SampProp2)/SampSize2

The z-multiple for he confidence interval is calculated in cell B15 with the formula

=NORMSINV(ConfLev+(1-ConfLev/2)

Finally, the limits of the confidence interval for the difference are calculated in cells B18 and B19 with the formulas =Diff-zMult*StErr =Diff+zMult*StErr

Page 37: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Conclusions Because the confidence limits are both positive, we can

conclude that the effect of coupons is almost surely to increase the proportion of buyers.

How can the store manager interpret this mean difference? He can use it to estimate the extra business he will receive by including coupons as opposed to not including them.

The confidence interval implies that for every 100 customers, the coupons will probably induce an extra 3 to 23 customers to purchase an appliance who otherwise would not have made a purchase.

Page 38: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Conclusions -- continued However, the difference between proportions does not

directly indicate the difference in profit from including coupons.

This is because the customers with coupons pay 5% less than the customers without them.

For every 100 customers who receive a mailing with no coupon, the store can expect to make $1166.50 in profit. For every 100 that receive coupons the expected profit is $1100.10.

Thus the store makes less money including coupons.

Page 39: Lecture5 Applied Econometrics and Economic Modeling

Controlling Confidence Interval Length

Page 40: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Background Information

The fast-food manager in Example 9.1 surveyed 40 customers, each of whom rated a new sandwich on a scale of 1 to 10.

Based on the data, a 95% confidence interval for the mean rating of all potential customers extended from 5.739 to 6.761, for a half-length of (6.761-5.379)/2 = 0.511.

How large a sample would be needed to reduce this half-length to approximately 0.3?

Page 41: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Confidence Intervals Confidence intervals are a function of three things:

– the data in the sample

• We have control over the data by using the various random sampling plans to reduce variability.

• An area of statistics called experimental design suggests how to perform experiments to obtain the most information from a given amount of sample data.

– the confidence level

• This effect is clear as the confidence level increases, the length of the confidence interval increases as well.

– the sample size(s)

• The most obvious way to control confidence interval length is to choose the size of the sample appropriately.

Page 42: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Sample Size

Sample size selection must be done before a sample is observed.

Sample size estimation formula:

2

3.0

597.196.1

n

2

B

xmultiplezn

est

Page 43: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations

The formula for n uses three inputs:

– the z multiple, which is 1.96 for a 95% confidence level;

– the prescribed confidence interval half-length B, which is 0.3;

– and an estimate sigmaest of the standard deviation

The final input must be guessed, but for this example with a sample size 40 we can use the observed sample standard deviation of 1.597 (which can be determined with the STDEV function).

Page 44: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations -- continued The formula yields a rounded result of n = 109.

The claim, then is that the manager surveys 109 customers with a 95% confidence interval will have the approximate half length of 0.3.

Page 45: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Calculations -- continued

The same calculations can be done using the Sample Size Selection procedure of Excel’s StatPro add-in.

– Just select the menu item and select the parameter to analyze and enter the requested values.

– A message telling you the required sample size is displayed.

Page 46: Lecture5 Applied Econometrics and Economic Modeling

9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 9.7 | 9.8 | 9.9 | 9.10 | 9.11 | 9.12 | 9.13 | 9.14

Question What if the manager was at the planning stage and didn’t

have a “preliminary” sample of size 40? What standard deviation estimate should she use for est ?

The manager basically has three choices:

– she can base her estimate of the standard deviation on historical data assuming that relevant historical data are available,

– she can take a small preliminary sample (of size 20, say) just to get an estimate of the standard deviation,

– she can simply guess a value for the standard deviation.

• not recommended but there are some cases where it is the only feasible option.