confidence intervals for means chapter 8,section 1 statistical methods ii qm 3620

24
onfidence Intervals for Mean Chapter 8,Section 1 Statistical Methods II QM 3620

Upload: benjamin-rust

Post on 16-Dec-2015

226 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Confidence Intervals for MeansChapter 8,Section 1

Statistical Methods IIQM 3620

Page 2: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Estimation and Guessing

Suppose I wanted to guess your age. I would look you over carefully and then based on the information I have, I would venture a guess. Odds are that I would be wrong. I might actually be close, but I would most likely be wrong.

If it was really important that I get that guess correct, I could widen my guess a bit toinclude a range of values. If you go to a carnival where they will attempt to guess yourage for a prize, they consider themselves correct if they guess within a couple years.They give themselves a “margin of error” so to speak.

That margin of error compensates for the limited information they have on you. Ifthey could glean more information, like your parent’s age, when you graduated fromhigh school, etc., then they could accurately determine your precise age. Moreinformation allows you to guess more accurately and more precisely.

Page 3: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Estimation and Guessing

So how does that figure into what we are learning?

An important part of statistics is the ability to guess the value of certain numbers. Okay,guess is a dubious word. Let’s use the phrase estimate; its sounds more scientific.

So this is a class on guessing … er, I mean estimating?

Partially, but it is not as simple as that. There are bad ways to estimate and good ways toestimate, so we are going to learn how to go about it the right way.

Page 4: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

A Good Estimate

So what makes a good estimate?

A good estimate is accurate.A good estimate is precise.

Accuracy? Precision? What do you mean?

Accuracy is the ability to estimate correctly.Precision is the specificity of the estimate.Think of it this way: I could be 100% accurate if I said that you are between 0 and115 years of age, but I would be extremely imprecise.Alternatively, I could guess that you are exactly 21.6 years old. I would beextremely precise, but what are my chances of guessing correctly?

There is a trade-off between accuracy and precision. Precise estimates leadto inaccuracy, whereas accurate estimates require looser precision.So how do I win this“game” if there is a trade-off?

That is where statistics comes in. Statistics allows us to control the trade off ofprecision and accuracy so you can make the “best” estimate for your specificsituation.

Page 5: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Statisticians realized that they had to start with their best one number estimate, thepoint estimate. This is the one number that you would guess if you were only allowedone number.

So, what is the one number?

Well, that depends on what you are estimating. Generally speaking, if you have a sample of data, thebest one number estimate of the statistic in a population is the same statistic in the sample. In otherwords, the best one number estimate of the mean of a population would be the mean of the sample.If you want to estimate the proportion of a population, you start with the proportion in the sample.If you want to estimate … well,you get the picture.

So why aren’t we done once we have the point estimate?

That’s what I was explaining earlier when we talked about accuracy and precision. The point estimate is really precise; it’s one number. But, it’s also bound to be inaccurate. You onlyhave some of the data (i.e. a sample) rather than all of the data (i.e. the population) so anything basedon limited information is bound to be inaccurate.Okay, give me a hammer. Let’s pound that last point in. UNLESS YOU HAVE ALL OF THE DATA,YOUARE WORKING WITH LIMITED INFORMATION. LIMITED INFORMATION LEADS TOINACCURATE ESTIMATES. SO, CHOOSE YOUR POISON … INACCURACY OR IMPRECISION.IMPRECISION CAN BE DEALT WITH BUT INACCURACY JUST MAKES YOU WRONG.We are going to build a range or margin of error for our estimate to improve our accuracy … andsacrifice a bit of precision in the process. That is the best way to approach situations with limitedinformation.

How Did They Do It?

Page 6: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Forgot about samples and population, eh?Okay, quick review. Suppose we were interested in determining the average price paidfor a ticket to a baseball game.

When we say population, what we really mean is ALL of the observations that we want to talkabout.

Do we really want to make an estimate for ALL baseball games?We can’t seriously be including Little League games. Perhaps it is better to say all tickets to professional games.Oh, not interested in minor league games. The population would then be more properly defined as all professional majorleague games, or we could say all MLB games.What year? Thanks! You had to throw something into the mix, didn’t you. Let’s say this year’s MLB games.

Now that we have a population defined, let’s take a look at the observations.

It might be possible to determine the price of every ticket by badgering the front office of each baseball team, but thatdoes not address the discounts offered. Not every tickets goes for full price.And how the heck are we going to find out how much someone paid for a ticket when the game has already been played?How are we going to find all those people?Bottom line is that looking at every observation in a population is possible … sometimes … but usually we have to lookat those observations for which we have access.This doesn’t even start to address the problems looking at observations when we have to destroy the observation to geta measurement. Say for example, the need for a company like General Electric to determine the average lifespan of theirlight bulbs. If we destroy all of the observations, then where are we?

A sample is just a subset of the population; one that we can get our hands on and hopefullyone that represents the population well. Random samples are always the best.

Populations? Samples?

Page 7: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

We’ve got a sample, and we’ve calculated the point estimate. In this case, let’s say we have a sampleof 100 observations of the amount spent on a MLB ticket this year.

The average price of these 100 tickets was $23.52. This would make a good starting (point) estimate for the averageprice for all of the tickets.Do you suppose that this is really the average price paid for ALL MLB tickets this year?

Didn’t think so. You are too smart to think it was that easy.

Now we have to build a margin of error around our point estimate.Our margin of error depends on how much the ticket prices vary.

Think of it this way. If all of the tickets in the sample were exactly the same price, then we might reasonably think that all tickets in the population cost the same. If that is the case, we could use our sample average to estimate the population average with no margin of error. Simple … but unrealistic.

Point of fact: If there is a large variation in the values of the sample observations, we can presume that there is also a large variation in the values in the population. That would imply that our sample average might change quite a bit from sample to sample as the observations could be quite different in each sample.

Another point of fact: The fewer observations in the sample, the less information we even have about the point estimate and the greater we have to compensate for a lack of complete information.

Bottom Line: The margin of error has everything to do with the number of and variance in the observations, and not the value of the point estimate.

Margin of Error

Page 8: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Hopefully you now understand the basic thoughts behind estimating with a range usinga margin of error. Creating one is not that difficult. Just remind yourself that boringstatisticians formulated this so you don’t have to.The Mechanics

To actually create the range using a margin of error, we focus on how much a sample mean is likely to vary from sample to sample.

This tells us how close we can expect the sample mean to be from he population mean we are interested in.

If the sample means are expected to vary substantially from sample to sample, the population mean could be far away from the sample mean and we would have to compensate with a large margin of error. If the sample means vary little ,then the population mean will likely be close to the sample mean and our margin of error will be small.

Why it Works

Page 9: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

• How do we know how much the sample means will vary when we only have one sample?

• Good question! The good news is that the variation in the sample means

can be directly calculated from the variation in the individual observations.

• There is a mathematical relationship … the standard error of the sample mean can be estimated by dividing the standard deviation of the observations by the square root of the sample size.

• Standard Error? Yes, to eliminate confusion, statisticians use the term

standard deviation to refer to the variation in individual data points and the term standard error to refer to the variation in calculations like a mean or median.

• So the standard error of the sample means is really just the standard deviation of the sample means … or how much sample means vary from sample to sample.

Why it Works

Page 10: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Take a close look at that second formula.

The calculation to the right hand side of the plus-minus sign (±) is the margin of error.The standard error of the sample mean can be estimated directly from the sample you took (see the slide“WhyIt Works” again if you don’t believe me).We stated that the margin of error needs to become greater if the sample size is smaller (hence we have lessinformation) or if the confidence level is higher (to increase accuracy we lose precision) …THEREFORE we canexpect a greater multiple for a smaller sample size and a greater multiple for a higher confidence level. The t-valuehas all of this built in.

The EquationOur next step is to use the margin of error (the amount we add and subtract from our point estimate) to form upOur “range guess” (or more technically, our confidence interval.) This confidence interval will give us the bestaccuracy and precision combination … but we need a statistical multiple from the statisticians. This multiple takesinto account the sample size and the confidence (accuracy) level (as was mentioned in the“Margin of Error” slide).

The general formula for all confidence intervals is:

PointEstimate Multiple

Standard Error ofPoint Estimate

The version for a confidence interval for a population mean is:

SampleMean t-value

Standard Error ofSample Mean

Page 11: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

• You are going to need to be able to determine the t-value (Stats I).

• Why do we use a t value? Let me explain it this way. The t value takes into account that we have had to estimate everything from our data.

• We estimate the standard deviation and the standard error of a sample mean from our data … and that was before we even got to our main purpose of estimating the overall mean. You can only estimate so many things before you better start compensating for it. The t value has a built in compensator for those intermediate estimates.

• The textbook reviews how to look up the t in the table on pages 340-342, if you are so inclined. Personally, I think a table sells the t value short.There are too many values that are needed that do not show up on the tables. Use the computer. It can fill in the blanks where no t value apparently exists. The next slide shows how we do it in Excel.

• By the way, in the future the multiple is not always a t value. It all depends. If you are estimating some other statistic besides the population mean, you will likely be using an altogether different multiple.

• The bottom line is that the multiple is invariably linked to the accuracy and precision of the estimate. High confidence (high accuracy) leads to a big multiple and less precision (wide margin of error), and vice versa.

The t-value

Page 12: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Finding a t value using Excel

The t Distribution

The t distribution looks just like anormal distribution, except it is a bitflatter (which depends on theamount of information you have –i.e. the sample size). An infinitesample size makes the tdistribution identical to the normaldistribution.

+ t value

So, a t value for a 95%confidence (or .95 in decimalformat) with a sample size of100 would be:

=TINV(1- 0.95,100 - 1)

To find a t value in Excel, you usethe TINV function. The TINVfunction needs two bits ofinformation:1) The confidence level you want; and2) the sample size (minus 1).

- t value

TheTINV function takes the confidence level backwards. It wants to knowthe level of “unconfidence” or the“probability that you are wrong”. To be95% confident would imply that you are 5%“unconfident”. The TINVfunction looks up the area outside the blue areas in the graph above.

The sample size has to be reduced by one when looking up the t value tocompensate for the estimation we did of the standard deviation. Trust meon this … you don’t want to see the derivations.

Page 13: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Putting it altogether …

What does that spell?

Now that we have everything

We have a point estimate … the mean we calculated from the sample … referred to as xWe have the measure of the variation in the sample … the standard deviation wecalculated from the sample… which is referred to as sWe have the sample size … the number of observations in the sample … which isreferred to as n

We have the multiple … the t value from Excel … which is referred to as t

x sntNo, it actually spells confidence interval calculation time

Page 14: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

The Calculation

Remember our confidence interval equation from an earlier slide,

SampleMean

t-value Standard Errorof Sample Mean

s

nx t

andt t-values

n Standard Error of

Sample Mean

Algebraically, the equation looks like:

Where x Sample Mean

Page 15: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Something to Keep in Mind

s

n tMargin of

Error

Variation in the sample:

Sample size:

Confidence Level (CL):

as s

as n

as CL

Margin ofError

Margin ofError

Margin ofError

… and margin of error is directly related to precision. A smaller margin of error is amore precise estimate.

Page 16: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Remember, our whole reason for this series ofthoughts and calculations was to help us best

estimate the mean of some variable in a large groupby using only the limited information provided by a

sample from that group.

So What was the Point of All This?

Page 17: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Let’s try this for real

ApplicationTime

Page 18: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Read the discussion of interval estimation when the standard deviation for thepopulation is unknown (page 340) and the explanation of the t distribution anddegrees of freedom (pages 340-342).Read the business application on pages 342-343.Heritage Software operates a service center in Tulsa, Oklahoma to respond toservice calls on their educational and business software.Time spent helping a customer is an important measure of efficiency of theseoperations. More time per customers means that more service operators must beon staff to handle the load.Management would like the average call time for these service operators to beestimated.A sample of 25 calls was collected and recorded with the intent of estimating theaverage time for all calls taken by the service operators.

Business Application Highlights

Page 19: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

The 25 calls that we have data on will serve as a basis for our estimate. We can calculate amean from the sample and use it as a point estimate (one number estimate) for the meanlength of all calls. The is the anchor of our interval estimate.We also need the standard deviation of the observations. This, along with the sample size,will be used to calculate the standard error of the sample mean.The t value,which is our multiple, will be determined using Excel. We try not to use tables inthis class.We’ll use two different approaches on Excel to get us the information we need. One will domost of the work for us. The other requires us to walk through the process step by step.KNOW THEM BOTH.The key to this whole process is to remind yourself that you are working with a small bit ofinformation from a sample. You are trying to estimate something that you have no way ofverifying. Using a logical data-driven approach, we can derive information from the sample togive us a “best guess” interval that also provides us with a means of measuring our“accuracy” via the confidence level. It is better to know how certain you are than to beshooting in the dark.

The Approach

Page 20: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

The Point EstimateThe point estimate for the population mean is always the sample mean. It’s

our one number best guess.

The Confidence Level

A standard confidence level is 95%,which means our odds are 19 out of 20(95%) that the confidence interval captures the mean length of a servicecenter call for all calls. Remember, this is based solely on the information wehave from a small sample of calls.If 95% isn’t good enough (not your decision in this case), then you can be morecertain by using a 99% confidence interval. The bad news: remember whathappens to precision when we want to be more accurate.

The Standard Error of the Point EstimateThe mean of a sample, which is our point estimate, is going to change from

sample to sample. Taking into account this variation is a key part of forming aninterval estimate. If the point estimates would vary a great deal, then we willhave to form up a pretty wide interval to take that into account.

A Reiteration of Definitions

Page 21: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

All statistical estimates are going to come with some assumptions.

The first assumption is that you are not trying to cook the data to makethe estimate come out in some predetermined way. We’ll say that you aresupposed to be unbiased. This is not an explicit assumption, but it is therenonetheless.The second basic assumption is that we took a random sample

Most all statistical calculations assume that you are not choosing the members of thesample based on opinion. For the mathematics to work in this situation, you need to beallowing each observation to have an equal chance to be in the sample.That is called arandom sample … like rolling dice to see which observation to include.Think back to the MLB ticket price example. It is probably impossible to randomlychoose from the tickets that were sold. Thus we may have tried to use a random sample,but it is doubtful that we actually achieved randomness. That makes any resultsquestionable. When someone says they sampled randomly, ask them how they did it.Question everything.NOTE: Statistical calculations are built to deal with random samples. Any confidenceintervals you calculate will never adjust for bias or poor sampling techniques. The marginof error is built to handle natural variation in the data, not incompetence.

The Implied Assumptions

Page 22: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

The text indicates the we have to assume that the observation values (call lengths inthis case) are mound-shaped or normally distributed, specifically if the sample size issmall.

The brutal truth is that even with small sample sizes, the confidence interval we are calculating willwork, and statisticians tend to spend too much time on the little details.

The main problem here is not going to be the distribution of the observations, but the means by which wechoose them. If we could really randomly select from all observations, then it is likely that thoseobservations are all in the computer … and then we don’t really need to use statistics to estimateanything. We just calculate the real number by using all of the observations.

For really small sample sizes, you do need to make sure that the observations are not strongly non-mound-shaped. Did you follow that? That means, if the sample is really small, say 20 or less, then thedistribution of the observations should really be reasonably mound-shaped, with strong emphasis onthe word “reasonably”. The problems only seem to occur in a sample with a strong bi-modaldistribution (which means that observations form what looks more like two mounds rather thanone.)

How do you check the distribution of the observations? I am glad you asked. Plot a histogram. Theyare not difficult to do with Excel and you might be surprised on the amount of information you canglean about some variable by looking at a histogram.

The Formal Assumptions

Page 23: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Heritage Software operates a service center in Tulsa, Oklahoma to respond toservice calls on their educational and business software.

Time spent helping a customer is an important measure of efficiency of theseoperations. More time per customers means that more service operators must beon staff to handle the load.

Management would like the average call time for these service operators to beestimated.

A sample of 25 calls was collected and recorded with the intent of estimating theaverage time for all calls taken by the service operators.

Problem 1

Page 24: Confidence Intervals for Means Chapter 8,Section 1 Statistical Methods II QM 3620

Medlin & Associates is a CPA firm that is conducting an audit of a discount chain store.

Management would like to have some measure of the amount of error that is occurring during checkout operations.

A sample of 20 transactions are taken and the amount and direct of a mischarge is noted. Positives values indicate overcharges to the customers; negative values are undercharges.

The problem asks for a 90% confidence interval. That means that our interval will be narrower, but our degree of certainty is less. We are trading accuracy for precision.

Problem 2