Run ANOVA tests for the price and whether the house is new or not and how many bathrooms it has (R or SAS)
Price | New | Baths |
279900 | 0 | 2 |
146500 | 1 | 1 |
237700 | 1 | 2 |
200000 | 1 | 2 |
159900 | 0 | 3 |
499900 | 1 | 2 |
265500 | 0 | 2 |
289900 | 1 | 2 |
587000 | 0 | 4 |
70000 | 0 | 2 |
64500 | 0 | 2 |
167000 | 1 | 2 |
114600 | 0 | 2 |
1) alpha level 0.05, test hypothesis of no interaction
2) If no interaction, test that the mean of the price is the same for new and old houses, control for bathrooms.
Thanks
1)
I am using R to run the anova test.
Loaded the data into "house" dataframe.
> str(house)
'data.frame': 13 obs. of 3 variables:
$ Price: int 279900 146500 237700 200000 159900 499900 265500
289900 587000 70000 ...
$ New : int 0 1 1 1 0 1 0 1 0 0 ...
$ Baths: int 2 1 2 2 3 2 2 2 4 2 ...
Make the New variable as factor variable.
house$New = as.factor(house$New)
Run the linear regression with Price as response variable and New and Baths as predictor variables with their interactions.
m = lm(Price~New+Baths+New:Baths, data = house)
Run the anova test.
> anova(m)
Analysis of Variance Table
Response: Price
Df Sum Sq Mean Sq F value Pr(>F)
New 1 4.3357e+09 4.3357e+09 0.2617 0.62127
Baths 1 1.3503e+11 1.3503e+11 8.1507 0.01894 *
New:Baths 1 1.6257e+09 1.6257e+09 0.0981 0.76122
Residuals 9 1.4910e+11 1.6567e+10
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
1
We see that the p-value for interaction is 0.76122 which is greater than the significance level of 0.05. Hence there is no significant interaction between New and Baths variable.
2)
H0: The price of new and old houses are equal.
H1:The price of new and old houses are unequal.
Get the data for New and Old house in x and y and run t-test
> x = subset(house, New == 0, select = c(Price))
> y = subset(house, New == 1, select = c(Price))
> t.test(x,y)
Welch Two Sample t-test
data: x and y
t = -0.4201, df = 10.68, p-value = 0.6827
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-229266.5 155999.8
sample estimates:
mean of x mean of y
220200.0 256833.3
As, p-value is 0.6827 which is greater than significance level of 0.05, we fail to reject the null hypothesis and conclude that there is no significant difference in the prices of new and old houses.
Run ANOVA tests for the price and whether the house is new or not and how...
ANOVA A study is designed to examine whether there is a difference in mean daily calcium intake among three groups of adults with normal bone density (Norm), adults with osteopenia (OstPNia) (a low bone density which may lead to osteoporosis) and adults with osteoporosis (OstPSis). A total of twenty-one adults at age 60 was recruited in the study (7 adults in each group). Each participant's daily calcium intake was measured based on reported food intake and supplements in milligrams. We...
House Sell Price 187000 181000 184000 188000 196000 198000 500000 187000 188000 189000 201000 202000 202000 173000 194000 188000 199000 195000 183000 185000 180000 187000 213000 207000 207000 200000 200000 218000 189000 197000 208000 188000 212000 195000 185000 3. The end-of-year report for last year indicated the average sell price for houses in Las Cruces is $190,000. A realtor wants to conduct an experiment to show that the house sell price has increased this year compared to last year. He...
Question 1 Suppose we wanted to predict the selling price of a house using its size in a certain area of a city. A random sample of six houses were selected from the area. The data is presented in the following table with size given in hundreds of square feet, and sale price in thousands of dollars. Size (Xi) 12 15 18 21 24 27 Price (Yi) 60 85 75 105 120 110 a) Find the least squares estimate for the...
Hope you can answer them, thank you QUESTION 13 Your client has a gut feeling (she uses the force) that the average house price in Lincoln Dark is $450K. You decide to use the previously collected data. Your sample size is 25 houses. The average based on the sample is $500K. The sample standard deviation is $100K. Test the hypothesis that the average house price in Lincoln Dark is $450K against the alternative that it is not. Use alpha 10%....
S. Chi-Squared Test of Independence Tests for the adverse reactions to a new drug vielded the results given in the table. At the 0.05 significance level, test the claim that the treatment is independent of the reaction (headache or no headache experienced). DrugPlacebo 7 Headache No headache 73 91 Hypothesis Ho: На: points Expected Values points Decision points Conclusion points S. Chi-Squared Test of Independence Tests for the adverse reactions to a new drug vielded the results given in the...
The end-of-year report for last year indicated the average sell price for houses in Las Cruces is $190,000. A realtor wants to conduct an experiment to show that the house sell price has increased this year compared to last year. He randomly selected 35 houses that are sold this year, and the data is provided in the Excel file provided. Make a boxplot on the house sell price, and identify if there are outliers observed from the data. Attach the...
Suppose the following data were collected relating the selling price of a house to square footage and whether or not the house is made out of brick. Use statistical software to find the regression equation. Is there enough evidence to support the claim that on average brick houses are more expensive than other types of houses at the 0.05 level of significance? If yes, type the regression equation in the spaces provided with answers rounded to two decimal places. Else,...
In real estate, it is common knowledge that where the house is located is extremely important (many people summarize this by saying the three most important factors in home sales are location, location, and location). Many characteristics of a house are tied to its location, one of which is age. Some neighborhoods are considered "old" while others are considered "new," with new homes generally selling at a higher price. One way to compare "old" and "new" neighborhoods is to examine...
data: Price Size Bedrooms Baths Age $235,000.00 1,530 3 2 6 $375,000.00 2,380 4 3 43 $199,950.00 720 2 1 2 $258,000.00 1,040 2 2 40 $96,500.00 484 1 1 43 $237,000.00 1,584 3 3 23 $829,000.00 2,701 5 3 7 $200,000.00 952 2 2 18 $328,500.00 1,098 3 3 75 $365,000.00 2,004 3 2 35 $116,000.00 640 2 1 41 $885,000.00 3,849 6 4 5 $250,000.00 2,010 3 2 84 $165,000.00 575 2 1 32 $159,900.00 984 2 2...
A health psychologist tests a new intervention to determine if it can change healthy behaviors among siblings. To conduct this test using a matched-pairs design, the researcher gives one sibling an intervention, and the other sibling is given a control task without the intervention. The number of healthy behaviors observed in the siblings during a 5-minute observation was then recorded. Intervention Yes No 6 4 2 5 5 4 6 5 6 4 5 4 (a) Test whether or not...