208k views
5 votes
A study was made comparing the cost of a one-bedroom apartment in philadelphia with the cost of similar apartments in Baltimore. A sample of 30 apartments in Philadelphia showed a sample mean of $950 with a standard devation of $50. A sample of 25 apartments in Baltimore showed a sample mean of $915 and a sample stand deviation of $45. Test to see if there is a significant difference in mean rental rate between the two cities. Use a 5% leve of significance.What is your conclusion?

User McDowell
by
8.2k points

1 Answer

4 votes

Answer:


t=\frac{(950 -915)-(0)}{\sqrt{(50^2)/(30)}+(45^2)/(25)}=2.73


p_v =2*P(t_(53)>2.73) =0.0086

So with the p value obtained and using the significance level given
\alpha=0.05 we have
p_v<\alpha so we can conclude that we have enough evidence to reject the null hypothesis, and we can said that at 5% of significance the mean of the group 1 (Philadelphia) is significantly different than the mean for the group 2 (Baltimore).

Explanation:

The system of hypothesis on this case are:

Null hypothesis:
\mu_1 = \mu_2

Alternative hypothesis:
\mu_1 \\eq \mu_2

Or equivalently:

Null hypothesis:
\mu_1 - \mu_2 = 0

Alternative hypothesis:
\mu_1 -\mu_2\\eq 0

Our notation on this case :


n_1 =30 represent the sample size for group 1 (Philadelphia)


n_2 =25 represent the sample size for group 2 (Baltimore)


\bar X_1 =950 represent the sample mean for the group 1


\bar X_2 =915 represent the sample mean for the group 2


s_1=50 represent the sample standard deviation for group 1


s_2=45 represent the sample standard deviation for group 2

If we see the alternative hypothesis we see that we are conducting a bilateral test or two tail.

Critical values

On this case since the significance level is 0.05 and we are conducting a bilateral test we have two critical values, and we need on each tail of the distribution
\alpha/2 = 0.025 of the area.

The distribution on this case since we don't know the population deviation for both samples is the t distribution with
df=n_1+n_2 -2= 30+25-2=53 degrees of freedom.

We can use the following excel codes in order to find the critical values:

"=T.INV(0.025,53)", "=T.INV(1-0.025,53)"

And we got: (-2.01, 2.01)

Calculate th statistic

The statistic is given by this formula:


t=\frac{(\bar X_1 -\bar X_2)-(\mu_(1)-\mu_2)}{\sqrt{(s^2_1)/(n_1)}+(S^2_2)/(n_2)}

And now we can calculate the statistic:


t=\frac{(950 -915)-(0)}{\sqrt{(50^2)/(30)}+(45^2)/(25)}=2.73

The degrees of freedom are given by:


df=30+25-2=53

P value

And now we can calculate the p value using the altenative hypothesis:


p_v =2*P(t_(53)>2.73) =0.0086

So with the p value obtained and using the significance level given
\alpha=0.05 we have
p_v<\alpha so we can conclude that we have enough evidence to reject the null hypothesis, and we can said that at 5% of significance the mean of the group 1 (Philadelphia) is significantly different than the mean for the group 2 (Baltimore).

User Matthijs Kooijman
by
8.8k points