Type II Error
Categories: Metrics
Lots of bad Type 2's. Diabetes. Okidata. Times New Roman.
A Type II Error happens when we fail to reject the null hypothesis in a hypothesis test when the null hypothesis is actually false.
We used to work in a candy factory. Lots of little orange dudes running around. You know the one. One day, we got word that the candy bars being sent out weighed significantly less than the 96 grams they were supposed to weigh. We conducted a hypothesis test at the 0.05 alpha-level to determine if there was sufficient evidence to suggest that the candy bars did weigh less than 96 grams.
We got a p-value of 0.18, indicating that we should not reject the null hypothesis...meaning we believe our candy bars are the correct weight after all. As such, we didn’t bother to examine the machine that made the bars to ensure everything was hunky-dory. It turns out that the candy bars were actually too small. Our decision to not examine the faulty machine (because the hypothesis test results suggested there was no reason to, a Type II Error in this case) led to us making some of our customers mad, and they subsequently stopped buying our bars.
Related or Semi-related Video
![Finance: What is r-squared?](https://media1.shmoop.com/video/thumbnails/COURSE.FINANCE.281_770x433.jpg)
Finance: What is r-squared?0 Views
Finance allah shmoop what is r squared r squared It's
a measure of the personage of change in one variable
Do exclusively to changes in another variable Accidentally back into
a car in the lot and need someone to blame
it on late for work and need a scapegoat The
boss will believe well r squared is here to find
you up patsy To take the blame for well pretty
much anything you can dream up well r squared won't
take the fall for you It will find the fall
guy best suited for that job So let's say we
looked at a set of by various or to variable
data that compares the top speed of remote control cars
to the size of the tires on the car which
end up having in our scored value of point seven
nine That means seventy nine percent of the changes in
the top speed of the car were due to changes
in the size of the tires More simply the changes
entire side are the primary cause then in changes in
the top speed and you'd say in normal english the
r squared between larger tires and faster speed was high
like point eight Other factors affect top speed like wind
resistance battery power and so on But change his entire
speech of the primary cause for changes in top speed
We need to be careful not to say that tire
size is the primary cause of top speed See that
was a little error there They just fill in You
are square doesn't tell us that It just tells us
that changes in the tire side are the primary cause
for changes in the top speed meaning they're just related
We don't know that one causes the other and the
difference is subtle But while hugely important here So let's
walk through how we might really work with r squared
from beginning to end in a problem What We've got
two variables like the daily price of a gallon gasoline
and the average number of gallons purchased per customer on
that same day It's not unreasonable to think that changes
in the price of gas or a factor in how
much gas people buy but how much of a factor
like a gallon of gasoline costs You know eighteen dollars
right there pete Fewer people buying instead of a god
three bucks So r squared will tell us how much
of the changes in how much people pump into their
tank is due to changes in the price of gas
And how much of those changes in the amount of
gas purchased is due to other factors like time of
season or the length of trip there taking or the
amount of money they happen to have on hand or
how loud the kids are screaming Are we there yet
Are we there yet in the back seat Yeah okay
well because we knew it would come in handy We
collected data from our local gas and sip on seven
different days Calculations like the coefficient of determination are squared
and or the correlation coefficient are should only be attempted
on data that has a linear ish shape It's always
a good idea to whip up a scatter plot of
the data just to make sure it's not obviously curved
or has some other weird non linear pattern that we
can't then generalize from Well the pattern here is linear
enough and doesn't show an obvious curve or other pattern
So we're good to go and we can calculate r
squared by hand but almost nobody does Even for a
very small data sets graphing calculator spreadsheets and web sites
dedicated to finding our and only r and r squared
Well all do a dandy job of getting us the
values we want So let's do that well after popping
this data into our jailbroken diamond plated solar powered voice
activated t I eighty four plus i'd any um edition
We get in our squared value of point one three
five eight right there What does that mean for us
And for our gas problem Well since r squared is
the percentage of change in the uae variable that is
do strictly to changes in the x variable It means
that on ly thirteen point five eight percent of changes
in the average amount of gas purchase are due to
changes in the price of gas It also means that
eighty six point four two percent of the changes in
the amount of gas purchase are due to other factors
like changes in how much money people have on hand
It could also have to do with well changes in
how far they're planning on driving That day could mean
many other things but it doesn't For now we're just
focused on the numbers And again we need to be
very careful not to claim that r squared number tells
us how much of a percentage cause one variable to
do another thing that's a no no r squared is
always an on ly the percentage of changes in one
variable do ooh to changes in the other Also weaken
Take r squared out back behind the wood shed and
square roots The mess out of it to get the
correlation coefficient are got it Okay Some important safety tips
We should only find r squared for data that have
a linear ish pattern We confined our squared by hand
but that's a sign of insanity So used tech to
do the grunt work for the actual calculations Well our
scores the percentage of change in one variable that is
do strictly to changes in another variable if we square
root are squared while we get the correlation coefficient are
positive number There never never ever suggest that ninety nine
percent of the changes in a police person's weight is
due to changes in doughnut consumption either just a extra 00:04:39.283 --> [endTime] free warning there from your friends at shmoop