Hypothesis testing based on the concentrations of two cigarettes' samples A cigarette producer sent two samples, one for each laboratory, which he thinks to be identical. The laboratories determined the concentration (in mg) of nicotine in each sample and they obtained the following results: (1) 24, 27, 26, 21, 24 and (2) 27,28,23,31,26. Is there any difference in the measurements? Assume normality and common variance and significance level $\alpha = 0.05$.
MY ATTEMPT
As fas as I have understood, we are interested in testing the hypothesis: $H_{0}: \mu_{1} = \mu_{2}$. My question is: how do we tackle this problem if we don't know the variances? Precisely speaking, I'd like to know which statistics should we use to solve the problem.
 A: You will have to use the same varience for each data set. Below is a good link to reference for a two sample t-test. 
https://youtu.be/N984XGLjQfs
A: You'll need (1) the mean of both samples (2) the standard deviation of both samples (3) the number of observations in both samples.
Then you can calculate the t statistic by subtracting the first sample mean by the second sample mean. This is your numerator. Now find the square root of: the standard deviation squared of the first sample divided by the number of observations in the first sample added to the standard deviation squared of the second sample divided by the number of observations in the second sample.  That's your denominator.  Once you have divided your numerator by your denominator take the result and look it up on the t-table to see if you can reject the null hypothesis.
 
A: My goal here is to get you to think about what you are doing as you perform the appropriate test. Some numerical answers are given, but please make sure you know how to compute them according to what you have encountered in your course. [If you still have questions after you have
considered what is on this page, try asking and see if someone here
will explain.]
According to the instructions in the problem, you should use a 'pooled 2-sample t test'.  The null hypothesis is that
the two brands have the same level of nicotine $H_0: \mu_1 = \mu_2$ and
the alternative hypothesis is $H_a: \mu_1 \ne \mu_2.$ [What are the clues in the statement of the problem that lead to doing a pooled 2-sample t test of this particular null hypothesis?]
The formula for the pooled 2-sample t statistic should be in your textbook
or class notes. You will see that the required information to use in that formula is: (i) the two
sample sizes $n_1 = n_2 = 4$ (ii) he two sample means $\bar X_1$ and $\bar X_2,$ and (iii) the two sample standard deviations $S_1$ and $S_2$ (or variances
$S_1^2$ and $S_2^2).$ 
Samples are small enough that you should be able to calculate sample means and
variances on a hand calculator. So that you can check your work, I am showing
calculations from R statistical software below:
x1 = c(24, 27, 26, 21, 24);  x2 = c(27,28,23,31,26)
mean(x1);  sd(x1)
[1] 24.4
[1] 2.302173
mean(x2);  sd(x2)
[1] 27
[1] 2.915476

Computer output for the pooled 2-sample t test is shown below (slightly abridged for relevance). [At some point in your course, you may be
introduced to the use of technology, but for now make sure you can do the steps on your own.]
t.test(x1, x2, var.eq = T)

        Two Sample t-test

data:  x1 and x2
t = -1.565, df = 8, p-value = 0.1562

Because the P-value exceeds $5\% = 0.05,$ you cannot reject $H_0$ at the 5% level of significance.
You may be expected to find the 'critical value' $c$ for this test,
rejecting $H_0$ if $|T| \ge c.$  From the computer printout we see
that $T = -1.565.$ You should use the formula for the test statistic $T$
for yourself and verify that you get the same answer. [Ordinarily, you cannot
get exact P-values from printed tables or by hand computation.]
You can find $c$ in a printed table of the Student's
t distribution. Because the degrees of freedom are $\nu = n_1 + n_2 -2 = 8,$
 you should look in the row for $\nu = 8$ in the table. You want
a value that cuts 2.5% from the upper tail of the distribution. 
Depending on the style of t table you are using, the column header for
$c$ may be labeled '0.025' or '0.975'. [Make sure you understand the connection
between 0.025 and 5%.]
In the figure below, the critical value $c$ is shown by the vertical dotted line. The area under the density curve to the right of this line is 0.025.

Note: You may find the link in another answer useful or not. The quality of such online resources varies greatly.
