Random 7yard sections from 48 bolts of typeA product contain a mean of 1.7 flaws per yard. Similar sections from 47 bolts of TypeB product contain 1.5 flaws per yard. The standard deviations are 0.6 and 0.9, respectively. a. There is no difference in quality of products b. Conduct a one-sided test to find TypeB is better then TypeA
n1=48; x1bar = 1.7; s1= 0.6;
n2=47; x2bar = 1.5; s2=0.9;
For a :
Null Hypothesis: There is difference between the quality of product
Alternative Hypothesis: There is no difference between the quality of product
Test statics $Z = \frac{\overline{x_1} – \overline{x_2}}{\sqrt{(s_1^2/n_1)+(s_2^2/n_2)}}= 1.2716$
Alpha value =0.05
p value is > 0.05. hence accept the null hypothesis that there is a difference in the quality of product
Is this correct ? this is a two tailed test right? as we have to test the equality..
The question is asking you to conduct two different hypothesis tests. The first test for part (a) is two-sided and is asking you to determine if the evidence collected from the two samples suggests with a high degree of confidence that the mean flaws per yard for the two types of product are different. In other words, if $\mu_A$ is the true population mean number of flaws per yard of product $A$ and $\mu_B$ is the true population mean number of flaws of product $B$, then we must test $$H_0 : \mu_A = \mu_B \quad \mathrm{vs.} \quad H_a : \mu_A \ne \mu_B.$$ Your analysis is incorrect because you have specified the reverse hypothesis, which makes no sense: your test would not be able to detect if the mean flaws per yard are different because the test statistic is calculated under the assumption that $H_0$ is true. In other words, your statement of the hypothesis is saying, "assuming that the mean flaws per yard are unequal between products $A$ and $B$, does the data suggest that they are in fact equal? Clearly, that is not what you want to do, and moreover, the test statistic you are using is not appropriate for such a choice of $H_0$. If you do not understand why, you need to review hypothesis testing from an introductory statistics textbook.
That said, under the correct hypothesis as I have outlined above, the test statistic $$\frac{\bar x_A - \bar x_B}{\sqrt{s_A^2/n_A^2 + s_B^2/n_B}}$$ approximately follows a Student's $t$ distribution with $$\nu = \frac{(s_A^2/n_A + s_B^2/n_B)^2}{(s_A^2/n_A)^2/(n_A-1) + (S_B^2/n_B)^2/(n_B-1)}$$ degrees of freedom. This test is known as Welch's $t$-test and is appropriate when the two populations are assumed to be independent and normally distributed, but not necessarily with the same variance. The test statistic itself is easy to calculate from the given data, but in order to obtain a $p$-value, we must compare the test statistic against the appropriate $t$ distribution (alternatively, we can look up the critical value for a two-sided independent two-sample $t$-test with $\nu$ degrees of freedom at significance level $\alpha$).
However you do this, once you get a $p$-value, then your decision will be guided by the above hypothesis: if $p < \alpha$, this means the probability of observing the test statistic that you did assuming that $\mu_A = \mu_B$ is too small, thus you would conclude that the true mean flaws per yard are different between product $A$ and product $B$. That is, you would reject $H_0$ in favor of $H_a$ because your test statistic is too extreme. If $p > \alpha$, then the test is inconclusive: there is insufficient evidence to suggest that there is a difference in the true mean number of flaws. You would thus fail to reject $H_0$. That is not the same as saying that $H_0 : \mu_A = \mu_B$ is true--it means that the data doesn't suggest $H_0$ is false. It could still be that the two products differ in quality, but you simply don't have the data to support that conclusion.
You would perform a similar procedure for part (b), only this time, the structure of your hypothesis takes on the form $$H_0 : \mu_A = \mu_B \quad \mathrm{vs.} \quad H_a : \mu_A > \mu_B.$$ This is because you are interested in seeing if the data supports the alternative hypothesis that product $B$ is better than product $A$; i.e., the mean flaws per yard is smaller for product $B$.