**Question 7**

A study was performed to test wether cars get better mileage on premium gas than on regular gas. Each of 10 cars was first filled with regular or premium gas, decided by a coin toss, and the mileage for the tank was recorded. The mileage was recorded again for the same cars using other kind of gasoline.

Determine wether cars get significantly better mileage with premium gas.

Mileage with regular gas: 16,20,21,22,23,22,27,25,27,28

Mileage with premium gas: 19, 22,24,24,25,25,26,26,28,32

Click here to watch to see how to transfer this data to excel (using transpose) without typing them.

**Solution Steps**

So let's go through the steps again to solve this problem

Step 1: Set up your null and alternate hypothesis

**H**μ

_{0}:_{2}= μ

_{1}

**H**: μ

_{a}_{2}≠ μ

_{1}

**Step 2: Create the table to calculate difference**

If you have entered the data and the formula correctly, you will have the table below

Notice that in the table, there is mean and and standard deviation.

Watch to learn how to do this in excel

The symbol like a D in the table is actually a D with a bar on top.

**Step 3: Calculate the mean of the difference from the table**

From the table the mean difference is 2

**Step 4: Calculate the standard deviation of the differences**

This can be gotten using excel very easily. But in this example, we calculate it using the formular and we can see that it corresponds to the one in the excel sheet.

Using the formular

We have the

**Step 5: Calculate the Standard Error**

You can calculate the standard error using the formular

**Step 6: Calculate the t statistic**

We calculate t statistic using the formular

**Step 7: Look up the t statistic from the table of t-distribution**

Get a statistical table from here.

From the table of t-distribution we find t usind (n-1) = 9 degrees of freedom and 0.05 significance

That gives us 2.262.

**Step 8: Conpare tabulated value and calculated value and draw conclusion**

We see that the calculated value of t is greater than the critical value of t. This means that there is significant difference in the means of the two samples. Therefore we reject the null hypothesis that states that the two means are equal.