Welcome to a lesson on hypothesis testing
with two samples.
Studies often compare two groups.
For example, researchers are interested
in the effect aspirin has in preventing heart attacks.
Over the last several years,
articles have reported various aspirin studies
involving two groups, typically one group
is given aspirin and the other group is given a placebo.
Then the heart attack rate is studied over several years.
There are other situations that deal with the comparison
of two groups.
For example, studies comparing various diet
and exercise programs.
Politicians compare the proportion of individuals
from different income brackets who vote for them.
Students are interested in whether SAT
or GRE preparatory courses really help raise their scores.
We have learned to conduct hypothesis test on single means
and single proportions.
We will now compare two means
or two proportions to each other.
The general procedure is still the same just expanded.
To compare two means or two proportions,
we work with two groups.
The groups are classified
either as independent or matched pairs.
Independent groups consists of two samples
that are independent that is sample value selected
from one population are not related in any way
to sample values selected from the other population.
Matched pairs consists of two samples that are dependent.
The parameter tested using matched pairs
does the population mean the parameter is tested
using independent groups are either population means
or population proportions.
In this video, we will focus
on comparing two population means
with an unknown population standard deviation.
In this case, the two independent samples
are simple random samples from two distinct populations.
For the two distinct populations,
if the sample sizes are small,
the distributions are important
meaning they should be normal if the sample sizes are large,
the distributions are not important
meaning they need not be normal.
And below we have the formulas for the standard error,
notice how the test statistic is a t-score, this is because
we have an unknown population standard deviation
and here we have the formula for the degrees of freedom.
Let's take a look at an example.
The average amount of time boys and girls aged seven to 11,
spend playing sports each day is believed to be the same.
A study is done and data are collected resulting
in the table shown below.
Each population has a normal distribution.
Notice how we have the sample size,
the average number of hours playing sports per day
and the sample standard deviation.
So from the table, let's let x bar sub g equal
the sample mean for the girls
which is equal to two, s sub g,
the sample standard deviation is 0.866 for the girls
and the sample size n sub g is nine.
And then for the boys we have x bar sub b
is equal to 3.2, s sub g is equal to one
and n sub b is equal to 16.
We want to answer the question.
Is there a difference in the mean amount of time,
boys and girls age seven to 11 play sports each day,
tested at a 5% level of significance?
So we know alpha is equal to 0.05, 5% as a decimal.
Again the population standard deviations are unknown,
we will let mu sub g equal the population mean
for the girls and mu sub b equal population mean
for the boys.
Because we are trying to determine
whether there is a difference in the mean amount of time
boys and girls ages seven to 11 play sports each day,
the alternative hypothesis
is mu sub g doesn't equal mu sub b
and the null hypothesis is mu sub g equals mu sub b,
because if there is no difference they're the same
meaning mu sub g equals mu sub b.
We can also change the form of these hypotheses and state,
the alternative hypothesis is mu sub g minus mu sub b
doesn't equal zero
and then all hypothesis as mu sub g
minus mu sub b equals zero.
Notice how we have a two-tailed test
because of the not equal in the alternative hypothesis.
The distribution for the test as a student t distribution
again, because the population standard deviation is unknown.
We can refer to the t-score as t sub df
where df equals the degrees of freedom
which is approximately 18.8462
which we can obtain by evaluating
the formula shown here below.
And you may want to verify this,
we do not pool the variances.
Before we calculate the test statistic
which we now know is a t-score and the p-value,
let's look at this graph here below.
Notice x bar sub g minus x bar sub b
is equal to two minus 3.2 which is negative 1.2.
So if the population means that the same,
the difference would be zero
which is at the center of the distribution
and then to the left we have negative 1.2
to the right we have positive 1.2
and therefore the p-value is equal to the combined area
on the left and right.
If we multiply it by one half,
we can find the separate areas or the area on the left
and the area on the right
which means the p-value is also equal
to the probability that x bar sub g minus x bar sub b
is less than or equal to negative 1.2 or x bar sub g
minus X bar sub b is greater than or equal to 1.2.
Let's go to the T-84 and determine the t-score
and the p-value.
To do this, we press Stat right arrow to tests,
we want option for two sample t-tests,
we press four for the input we use statistics
which I've already selected,
down, x bar sub one is x bar sub g
which is two, Enter the sample standard deviation s sub g
is equal to 0.866, Enter.
The sample size is nine, Enter.
And now for the boys, the sample mean is 3.2, Enter.
The sample standard deviation is one, Enter.
The sample size for the boys is 16, Enter.
And now because the null hypothesis is mu sub g
doesn't equal mu sub b we select a not equals
by pressing Enter.
For pooled we select a no,
arrow down, arrow down again and we click Calculate.
So notice how the t-score is approximately negative 3.1424
and the p-value is approximately 0.0054.
Let's go ahead and record these.
Before we compare the p-value in the alpha,
let's talk about the t-score of negative 3.1424.
If we were doing this by hand,
we would calculate the z-scores for an alpha of 0.05
which I've already done here.
Notice the z-scores are 1.96 and negative 1.96.
And then if we calculate the t-score by hand,
notice how we get negative 3.1424
which we just saw on 84 and notice how this
is the left of the z-score of negative 1.96
and therefore the t-score is in the rejection region
meaning we reject the null hypothesis
but let's also find the same conclusion comparing
the p-value with alpha.
Notice how the p-value is low compared to alpha
and if the p-value is low, the null must go
or more firmly because the p-value
is less than or equal to alpha
or because alpha is greater than or equal to the p-value,
we reject the null hypothesis
which means we reject that mu sub g is equal to mu sub b,
the means are different.
Our final conclusion is at the 5% level of significance,
the sample data show there is sufficient evidence
to conclude that the mean number of hours
that girls and boys aged seven to 11
play sports per day is different.
I hope you found this helpful.