In: Statistics and Probability
Test if there is a significant difference in house prices for houses with 4 or more bedrooms, if compared to houses with 3 or less bedrooms. Answer the questions for Assessment. (Pick the closest answer)
1. What is the P-value? a. 0.074081031 b. 1.85525E-07 c. 0.002738669 d. 0.000144083
2. What is the Statistical interpretation? a. The P-value is too small to have a conclusive answer. b. The P-value is much smaller than 5% thus we are very certain that house prices are different. c. The P-value is much smaller than 5% thus the answer is inconclusive. d. The P-value is larger than 5% thus the answer is inconclusive.
3. What is the conclusion? a. Statistical interpretation agrees with the intuition: the house prices are different due to the number of bedrooms in the house. b. The statistics does not conform to the intuition that there is a difference in house price since one would expect number of bedrooms changes the house price. c. Since the test is inconclusive the conclusion is inconclusive as well. d. The test does not make statistical sense.
Age #Bathrooms #Rooms
#BedRooms #FirePlaces sellingPrice in
$100000
42 1 7 4
0 4.9176
62 1 7 4
0 5.0208
40 1 6 3
0 4.5429
54 1 6 3
0 4.5573
42 1 6 3
0 5.0597
56 1 6 3
0 3.891
51 1 7 3
1 5.898
32 1 6 3
0 5.6039
32 1 6 3
0 5.8282
30 1 6 3
0 5.3003
30 1 5 2
0 6.2712
32 1 6 3
0 5.9592
32 1 6 3
0 5.6039
50 1.5 8 4
0 8.2464
17 1.5 6 3
0 7.7841
23 1 7 3
0 9.0384
22 1.5 6 3
0 7.5422
44 1.5 6 3
0 6.0931
3 1 7 3
0 8.14
31 1.5 8 4
0 9.1416
42 2.5 10 5
1 16.4202
14 2.5 9 5
1 14.4598
46 1 5 2
1 5.05
22 1.5 7 3
1 6.6969
40 1 6 3
1 5.9894
50 1.5 8 4
1 8.7951
48 1.5 8 4
1 8.3607
30 1.5 6 3
1 12
We ran the t test in R difference in house prices for houses with 4 or more bedrooms, if compared to houses with 3 or less bedrooms.
1. Load the data into dataset house
2. Filter the selling price with 4 or more bedrooms
x = house$sellingPrice[BedRooms > 3]
3. Filter the selling price with 3 or less bedrooms.
y = house$sellingPrice[BedRooms < 4]
4. Run the t test, to get the P-value
t.test(x,y)
Welch Two Sample t-test
data: x and y
t = 2.0474, df = 8.1708, p-value = 0.07408
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-0.3762624 6.5318424
sample estimates:
mean of x mean of y
9.420275 6.342485
The output shows that the P-value is a. 0.074081031
2.
The statistical interpretation is,
b. The P-value is much smaller than 5% thus we are very certain that house prices are different.
3.
Since we reject the null hypothesis and accepted the claim because of low p-value, the conclusion is,
a. Statistical interpretation agrees with the intuition: the house prices are different due to the number of bedrooms in the house.