(upbeat music)
- Hello, I'm Professor Rick Jerz, and I welcome you
to this session titled, Confidence Intervals.
We are going to continue exploring sample data.
The topic for this session is confidence intervals.
To some students, this chapter might sound a little spooky,
but it is not.
In fact, I think that you will learn
that the general concept is relatively simple.
In this session, we are also going to learn
that when you do not have a population standard deviation,
you might want to use a different probability distribution,
called the t distribution.
Let's get started.
We have a number of goals for this session;
define a point estimate, define a level of confidence, construct
a population mean confidence interval when the standard deviation is known
and not known, apply a finite-population correction factor, calculate sample size,
and define "relative standard error." Wow, we have our work cut out for us!
This topic continues our exploration of sample data and using sample data
to infer characteristics about the population.
When we have the entire population data, we can calculate its exact central
tendency, the mean, and its dispersion, the standard deviation.
Remember that we represent the population mean with the symbol mu,
and the population standard deviation with the symbol sigma.
By contrast, the sample mean is represented
by x-bar, and the sample standard deviation with s.
When we don't have the entire population data, we want to use a sample to estimate
the population's central tendency, its mean, and its dispersion.
Let's begin by focusing on estimating the population's mean.
A point estimate is a statistic computed from sample
information used to estimate the population parameter.
The most common population parameter we want to
estimate is the population mean, its central tendency.
Suppose someone asks, "What are the average
heights of MBA students in your program?" If I had access to the heights
of all MBA students, I would probably respond with something
like, "Their average height is 5 feet, 8 inches." But if I do not have access
to the entire MBA student population, I could guess at the average.
However, I might also use a sample to estimate the population mean.
We are trying to estimate one point,
meaning the mean, of the entire student population.
Let's say that I take a sample, and the sample's mean is 5 feet 6 inches.
My colleague takes a sample, and her sample mean is 5 feet seven inches.
Notice that these sample means
can vary due to the random nature of picking a sample.
So it is difficult to pinpoint the exact population mean.
The inability to pinpoint the exact population mean from a sample
makes us want to "hedge" when someone asks for a specific value.
So, instead of providing an exact estimate, we use
what's called a "confidence interval estimate." A "confidence interval
estimate" is a range of values constructed from sample data
so that the population parameter, in my example, the student's height,
is likely to occur within the range at a specified probability.
The specified probability is called the "level of confidence."
Returning to stating student heights from the sample, I might say, "The student
height is five feet 6 inches, plus or minus 4 inches." Or "five
feet 6 inches, plus or minus 1 inch." Or perhaps "five feet 6 inches,
plus or minus 3 feet." If I want to be correct
at capturing the population mean, the wider my confidence interval,
the more likely my statement will be correct.
But how wide is wide enough?
Someone might say, "Anyone can say the height is between 1 and 10 feet.
What good are you?" Well, we want to be good.
The better we provide this estimate, the more value
your statement has perhaps to your organization.
So what should the confidence interval be for me to be correct,
or let's say 90% of the time, or 95% of the time, or 99%.
Well, this is what we want to calculate.
Instead of just guessing, we want to use the power of statistics
to predict, or infer, the population mean. These factors
affect the confidence intervals estimated width: the sample size, n,
the variability in the population, sigma, or estimated sample's
variability, s, the desired level of confidence
such as 90% or 98% and the relative size of our sample.
Here is the equation that we use to calculate the estimated range.
Whoa, a bit complex.
This is why this topic, confidence intervals, is difficult for students to learn.
Don't worry, our Excel model will ease the calculation burden.
Let's explore this equation and dissect it to understand what is happening.
First, we have x-bar.
This is the sample's calculated mean.
If all we had were one sample, the sample mean would be
our single best estimate of the population mean.
The stuff starting with the plus or minus symbol
is how we hedge our point estimate.
We add and subtract this calculation from the sample's mean to establish
our confidence interval.
n is the sample size.
Its main influence is in the denominator.
As the sample size increases, the confidence interval decreases.
Yep, larger sample sizes are better.
The variability is sigma, or s.
As the variability of the population is smaller,
meaning less variability, our confidence interval decreases.
This should make intuitive sense, less variation means more precision.
The level of confidence is this z or t.
As it increases, the confidence interval increases.
Sometimes students don't understand what is going on.
It can be somewhat more natural to think that as you become
more "confident," your interval narrows.
Not so.
If you want to be very confident at predicting the heights of students,
your interval becomes greater, as in between 1 foot tall and 10 feet tall.
You will always be right,
unless you happen to have a newborn baby in your MBA program.
The relative size of the sample is called the finite-population correction factor.
If our sample is from a very large population,
like an infinite population, this term goes to 1.
Many authors, for this reason, do not include it in the equation.
It only becomes of concern when we pick a sample from a small population.
Its value is less than one, so it reduces the width of the confidence interval.
I will say more about this correction factor, later.
So what is this "z or t" and "sigma or s" all about?
Think of these variables as pairs.
z goes with sigma, and t goes with s.
When we know how the population's
data tends to vary, in other words, the population variance
(or standard deviation) use the z, or normal distribution table,
just as we did in our last chapter about the normal probability distribution.
The only difference is that the sample size is used in the denominator.
Again, we let Excel do the calculations, not a table.
Hey, hold on, aren't we into sampling?
How would we ever know the population's variance?
The answer is that sometimes a process has been running for a long time,
so we have historical data, or measurements, about it.
For example, perhaps we have been producing a gear
on a specific milling machine for five years.
Our five years of measurement data allow us to calculate the process's variance.
This is how this particular machine tends to vary.
So we have its variation, or variance.
As another example,
my wife collects wage information for the Bureau of Labor Statistics.
They have been collecting janitor wages for over 40 years.
A lot of historical data, and they know how janitor wages have varied.
They have, essentially, the population variance.
So, when we have the population standard deviation, use
this form of the equation to calculate the confidence interval.
This equation also assumes that the population is infinite,
meaning no correction factor is needed.
Let's do an example.
The American Management Association wishes to have information
on the mean income of middle managers in the retail industry.
A random sample of 256 managers
reveals a sample mean of 45,420.
The standard deviation of this population is $2,050.
The association would like to answer the following question:
What is a reasonable range of values for the population mean?
Suppose that the association decides to use a 95% confidence level.
The author shows these calculations to be $45,420
plus or minus $251.
The confidence limits are $45,169
and $45,671.
The plus or minus $251
is referred to as the margin of error.
You will notice that good old z-statistic, an intermediate calculation,
coming into play again.
Our Excel model doesn't need it, and the Excel model
also avoids the need to memorize these equations.
But what does a 95% confidence level
between 45,169 and 45,671 imply?
Does it mean that the population mean is somewhere within 95% of this range?
Not exactly. What this really means can be non-intuitive.
What this means is represented by this graphic.
Look at it carefully.
If we were to repeat this experiment many, many times, let's say 100 times,
meaning taking 100 samples of 256 managers, and calculate
the confidence interval for each of these 100 repeated experiments,
approximately 95% of the calculated confidence intervals
will include the population mean, and approximately
5% of our confidence intervals will not include the population mean.
Because we randomly selected managers,
the sample may not exactly represent the population.
Well, even though there can be some error, about 95% of the time,
our confidence interval will contain the population mean.
This method is a lot more precise than simply guessing.
Our textbook provides another illustration of what
a confidence interval means by using simulation software.
This example illustrates taking 60
random samples with a sample size equal to 30.
For each sample, its mean and 95% confidence limits are calculated.
The textbook shows all 60 samples.
Highlighted in yellow are those samples that did not contain the population mean.
Typically, we run simulations thousands of times, not just 60.
If we were to do this, about 95% of the samples
would contain the population mean.
Later in this course, we will use Excel to do simulations.
I have replicated this textbook illustration in my Excel demo model,
the Confidence Interval Simulation worksheet.
I designed my model to be a little flexible
so that you can enter different means, population standard
deviations, and your confidence interval of interest.
To the right, I highlight those confidence intervals that do not contain
the population mean, which Excel calculates using all 3,000 values.
I summarize the results in this box, where I say that "We would expect
95% of all confidence intervals to contain the population mean."
Have fun with this Excel model.
Rerun this simulation by pressing the F9 key.
You will see that we do not always end up with exactly 95% of the confidence
intervals containing the population mean, but rather, approximately 95%.
My live Excel simulation model is a lot more fun
than staring at the author's static simulation results.
You can explore how I built this model.
I used Excel's RAND(), along with Excel's NORMINV().
I highlight the confidence intervals not containing the population
mean using Excel's conditional formatting.
In our first example, we said that we knew the population
standard deviation, but in many sampling situations,
the population standard deviation is not known.
What do we do?
Some people might say, "Why not simply use the sample
standard deviation?" Well, this is close.
And earlier we said that the sample standard deviation, s, goes along with t.
So what is this "t?" This "t" refers to a different distribution,
referred to as the t distribution.
Guess what, there's
another table in the back of your textbook for the t distribution.
Many years ago it was discovered that if you simply substituted
the sample standard deviation for the population standard deviation
when calculating confidence intervals, with smaller sample sizes,
you were off a little.
I can show you this problem with another Excel demo
model; Confidence Intervals with Unknown Mean.
In this area, I use the population standard deviation to establish
the confidence interval, and to the right, the sample standard deviation.
I count how many confidence intervals do not contain the population mean.
Whenever the sample standard deviation count is greater than the population
standard deviation count, I highlight this cell in red.
Keep hitting your F9 key.
You should observe that
you end up with more confidence intervals not containing the population mean
when the sample standard deviation is used almost all the time.
Bad news!
Why is the sample standard deviation less accurate?
Around 1900, William Gosset, living in England, came up with a solution
to this problem by developing a variation of the normal distribution.
His new distribution wasn't named the Gosset Distribution.
Instead, since Gosset used a pen name, "student." This distribution became known
as the student t distribution, or simply the t distribution.
Gosset didn't use Excel, either.
He did it by hand because Bill Gates was not around back then.
The t statistic, shown here, looks very similar to our z statistic.
Here are some characteristics of the t distribution.
It is, like the normal distribution, a continuous distribution.
It is also, like the normal distribution, bell-shaped and symmetrical.
However, there is not just one t distribution
but a family of t distributions.
All t distributions have their mean of zero,
and their standard deviations differ according to sample size.
This is not the first time we have had the concept of a family of distributions.
You might recall that the binomial distribution
had a distribution family based on the number of trials.
The t distribution is more spread out and flatter at the center
than the normal distribution.
However, this is important; the t distribution approaches
the normal distribution as the sample size increases.
So, it is acceptable to use the normal distribution
for large sample sizes, typically samples greater than 30.
Here, side by side, are the equations for the confidence interval estimates
for the mean, using the normal z-distribution and the t distribution.
You can see that the equations look very similar.
But the t distribution is flatter than the normal distribution, as shown here.
Both distributions are for the 95% confidence interval.
This means that if you do not know the population
standard deviation and use the t distribution,
your confidence interval will be a little wider.
You are essentially hedging a little more because you know less about your data.
I hope this can make intuitive sense to you.
Here is a flow chart summarizing what we have learned.
It is pretty simple, use the t distribution whenever
you do not know the population's standard deviation.
Although the logic is simple, in practice, this is not so simple
for the average student taught to use the table-reading approach.
The problem is that the t distribution table is much more complex.
It is challenging to learn to use.
And because it involves another parameter, the table, as typically constructed,
only applies to specific and limited probabilities.
When using Excel, as we do, these problems go away.
This is just like what happened for the binomial probably tables.
Instead of having to buy a book with a comprehensive
set of tables, we simply use Excel.
Let's look at an example using the t distribution.
A tire manufacturer wishes to investigate the tread life of its tires.
A sample of 10 tires driven 50,000 miles
revealed a sample mean of 0.32 inches of tread
remaining, with a standard deviation of 0.09 inches.
Construct a 95% confidence interval for the population mean.
Would it be reasonable for the manufacturer to conclude that
after 50,000 miles, the population mean
amount of tread remaining is 0.30 inches?
The author solves this problem
using the table in the back of the book and concludes that the manufacturer
can reasonably be sure, about 95% confident,
that the mean remaining tread depth is between 0.256 and 0.384 inches.
So, is the 0.3 inches within this range?
Yes, therefore, it would be reasonable for the manufacturer to conclude that
after 50,000 miles, the population mean amount of tread remaining is 0.3 inches.
Wow, this is pretty powerful stuff.
Instead of just guessing whether the 0.3 inches is
or isn't reasonable, we take a sample and calculate, statistically,
what we would expect to happen 95% of the time.
Remember, however, that 5% of the time,
the tread depth may not be in this range.
One interesting note is that Excel's Data Analysis ToolPak
always uses the t distribution.
I believe that Microsoft decided to take a conservative approach when it calculates
the confidence level and to always hedge with a slightly wider confidence interval.
Also, the difference between using the t or z distributions
diminishes with larger sample sizes.
Okay, let's return to the finite-population correction factor.
We use the finite-population correction factor
when the population being sampled is not infinite, or relatively large.
It looks like this.
If you are good with math, you would see that for large populations,
meaning large capital N, this term approaches 1.
As an illustration, if we take a sample of 15 students
from my class of 96 students, I should use this correction factor.
A sample of 15 from 96 is a relatively large sample.
Our sample is "more powerful," so we can improve our confidence
interval, meaning reduce its width by about 92 percent.
Typically, for two reasons, most folks don't worry about this correction factor.
The first reason is that most samples are from large
populations, so this correction factor approaches 1.
The second reason is that it is confusing.
I build this correction factor into my Excel model.
The t distribution and normal distribution
for sample data are both affected by sample size.
A reasonable question to ask is, "How do I select sample size?"
Three factors determine sample size,
none of which have any direct relationship to the size of the population.
They are the degree of confidence selected, the maximum
allowable error, and the variation in the population.
We can rewrite the z equation and solve for sample size using algebra,
as shown here. Here is an example.
A student in public administration wants to determine the mean
amount members of city councils in large cities earn per month
as remuneration for being a council member.
The error in estimating the mean is to be less than $100
with a 95% confidence level.
The student found a report by the Department of Labor
that estimated the standard deviation to be $1,000.
What is the required sample size?
The textbook solution, using the equation, is 385.
Here's another example.
A consumer group would like to estimate the mean monthly electrical charge
for a single-family house in July within $5 using a 99% confidence level.
Based on similar studies, the standard deviation is estimated to be $20.
How large a sample is required?
Using the equation, we can calculate the sample size to be 107.
In our previous session, I showed you that we could use the fourth column
in my Excel model to calculate the sample size.
I will demonstrate this again in my next Excel session.
You might notice that we assume that we know the population
standard deviation for these examples.
Hence, we can use our normal distribution equation.
Why don't we have an equation to calculate sample size when we do not know
the population standard deviation using the t distribution?
The answer is that the t distribution table is a family of tables.
The one in the back of most textbooks is an abbreviated table.
We need to know the sample size before picking the correct t distribution table.
But because we are trying
to calculate the sample size, we don't know which table to use.
So this is kind of like a dog chasing its tail.
My Excel model for the t distribution has a fourth column
to calculate sample size, but it is blank.
However, we can use Excel's
Goal Seek utility to approximate the sample size.
Some of you have never used Goal Seek, and I will try to show you
how to do this in my next session.
Our focus, thus far, has been on predicting the population mean.
How about the population standard deviation?
The standard error of the mean calculation provides
insight into the population standard deviation.
The smaller the standard error, the better.
However, one problem with the standard error
is that the standard error is naturally big for big data,
such as the distance from one city to another measured in feet.
And for small data, like M&M weight in
grams, the standard error is naturally small.
To address this problem, one can convert the standard error
to a relative measure by dividing the standard error
by what you are trying to predict, meaning the mean.
Again, the smaller, the better.
This relative standard error concept is a little advanced, and often ignored.
But since we are using Excel,
it was easy for me to do this calculation in my model.
Okay, in our next session, we will learn
how to use my Excel model to do these calculations.
You will learn that Excel
and my Excel models simplify what we have learned in this topic.
Some statisticians will argue that you need
specialized statistical software for this topic.
Not so.
I can't wait to show you my Excel models.
(gentle music)
Thanks for taking time to spend some moments with me.
I hope that you have enjoyed what I have shared with you.
If you ever have any questions or need my help,
please let me know.