P-value - test at $5 \%$ if there is significant difference in fuel consumption between the two petrol grades?

125 Views Asked by At

A car owners want to investigate if gasoline consumption of his car depends on the fuel octane number. He therefore intend to "premium" and "regular" at random and computes each time the average fuel consumption . After some time , he has received the following values ​: $$(P) Premium: 0.87, 0.93, 0.82, 0.95, 0.86, 0.88, 0.84, 0.91, 0.86, 0.92, 0.89, 0.90$$

$$(R) Regular: 0.88, 0.96, 0.92, 0.94, 0.93, 0.90, 0.95, 0.92, 0.89, 0.94, 0.97$$ Test at $5 \%$ if there is no significant difference in fuel consumption between the two petrol grades.

My attempt:

We want to compare the two samples $P$ from X and $R$ from Y, which comprising $n_1$=12 and $n_2=11$ respectively.

From the exercis we can see that we want to test the null hypothesis $$H_0: \ the \ fuel\ consumption \ of \ his \ car \ does \ not \ depends \ on \ the \ gasoline $$ against the alternatively hypothesis $$H_1: \ the \ fuel\ consumption \ of \ his \ car \ does \ depends \ on \ the \ gasoline$$ The alternatively is 2-sided hypothesis.

I did start with arrange all the observations in order of magnitude and did get $$R_1= sum \ of \ ranks \ of \ sample 1 = 103.5$$ $$R_2= sum \ of \ ranks \ of \ sample 2 = 172.5$$

there we have 7 groups of doublets and 1 group of triplets. I know that the rank sum i should use is the one for the sample is at least, which is $R_2$. Furthemore i know that i can approximate $R_2$ with normalapproximation because $n_1>10 \ and \ n_2>10$.

I do not know what to do now. What probabilty should i calculate? I know that i can standardize it to $N(0,1)$ and use the table, but I always get wrong answers.

EDIT:

The expected value for the normal approximation is 132 and the variance for the approximation is $\frac{24167}{91}$. When standardizing i get that $$Z=\frac{R_2-E(R_2)}{D(R_2)} \sim approx N(0,1)$$ What should I do now?

1

There are 1 best solutions below

2
On BEST ANSWER

I did this test is R and got the following results (not exact because of ties): W = 25.5, p-value = 0.01357. This agrees with what you say the answer should be. You don't show how you got 2.528. However, this is a two-sided test and I note that $P\{|Z| > 2.528\} = 0.0114$ and I'm wondering if the relatively small difference might be due to a computational or rounding error (please check) or due to fact that your correction for ties is only an approximation.

Notes (slightly revised to match edited question): (1) $R_1$ and $R_2$ are correct. (2) In Minitab, which handles ties slightly differently from R, the P-values are 0.0138 (unadjusted) and 0.0136 (adjusted for ties). I'm wondering if your answerbook just took results from computer output, not accounting for your rough method of adjusting for ties by hand. (3) According to your edit: $D(r_2) = \sqrt{24167/91} = 16.30.$ Then $Z = (172.5-132)/16.30 = 2.4847.$ To find the P-value you need to use normal tables (or software) to find $P\{|Z|>2.4847\} = 0.0129.$ I used software. For normal tables you will have to round to look up 2.48, and your answer will be slightly different. All versions of the P-value are between 0.011 and 0.014, so that the null hypothesis is rejected. All of them are approximations of one kind or another, so slight variations are inevitable.

KW: Wilcoxon Rank Sum Test, Mann-Whitney Test