Question

Create a hypothesis test question and show all the steps to solve it. Example: You found...

Create a hypothesis test question and show all the steps to solve it. Example: You found the mean for each quantitative variable. So, one at a time, is there significant evidence that the population maintenance cost for buses is more than###? and Find the regression equation for the 2 variables and explain what it is you found. Create a hypothesis test question for price and Size.

record Agent Price Size Bedrooms Baths Pool (yes is 1) Garage (Yes is 1) Days Township Mortgage type Years FICO Default (Yes is 1)
1 Marty 206424 1820 2 1.5 1 1 33 2 Fixed 2 824 0
2 Rose 346150 3010 3 2 0 0 36 4 Fixed 9 820 0
3 Carter 372360 3210 4 3 0 1 21 2 Fixed 18 819 0
4 Peterson 310622 3330 3 2.5 1 0 26 3 Fixed 17 817 0
5 Carter 496100 4510 6 4.5 0 1 13 4 Fixed 17 816 0
6 Peterson 294086 3440 4 3 1 1 31 4 Fixed 19 813 0
7 Carter 228810 2630 4 2.5 0 1 39 4 Adjustable 10 813 0
8 Isaacs 384420 4470 5 3.5 0 1 26 2 Fixed 6 812 0
9 Peterson 416120 4040 5 3.5 0 1 26 4 Fixed 3 810 0
10 Isaacs 487494 4380 6 4 1 1 32 3 Fixed 6 808 0
11 Rose 448800 5280 6 4 0 1 35 4 Fixed 8 806 1
12 Peterson 388960 4420 4 3 0 1 50 2 Adjustable 9 805 1
13 Marty 335610 2970 3 2.5 0 1 25 3 Adjustable 9 801 1
14 Rose 276000 2300 2 1.5 0 0 34 1 Fixed 20 798 0
15 Rose 346421 2970 4 3 1 1 17 3 Adjustable 10 795 0
16 Isaacs 453913 3660 6 4 1 1 12 3 Fixed 18 792 0
17 Carter 376146 3290 5 3.5 1 1 28 2 Adjustable 9 792 1
18 Peterson 694430 5900 5 3.5 1 1 36 3 Adjustable 10 788 0
19 Rose 251269 2050 3 2 1 1 38 3 Fixed 16 786 0
20 Rose 547596 4920 6 4.5 1 1 37 5 Fixed 2 785 0
21 Marty 214910 1950 2 1.5 1 0 20 4 Fixed 6 784 0
22 Rose 188799 1950 2 1.5 1 0 52 1 Fixed 10 782 0
23 Carter 459950 4680 4 3 1 1 31 4 Fixed 8 781 0
24 Isaacs 264160 2540 3 2.5 0 1 40 1 Fixed 18 780 0
25 Carter 393557 3180 4 3 1 1 54 1 Fixed 20 776 0
26 Isaacs 478675 4660 5 3.5 1 1 26 5 Adjustable 9 773 0
27 Carter 384020 4220 5 3.5 0 1 23 4 Adjustable 9 772 1
28 Marty 313200 3600 4 3 0 1 31 3 Fixed 19 772 0
29 Isaacs 274482 2990 3 2 1 0 37 3 Fixed 5 769 0
30 Marty 167962 1920 2 1.5 1 1 31 5 Fixed 6 769 0
0 0
Add a comment Improve this question Transcribed image text
Answer #1

We will use R in this case to solve the hypothesis and regression problem.

Now, the mean of the price is 360048.2, we can find it using the following code:

> data = read.table(file = 'clipboard',sep = '\t',header=TRUE)
> mean(data$Price)
[1] 360048.2

Now, we will propose the following null and alternative hypothesis:

\\ H_0: \mu \le 350000 \\ H_a: \mu > 350000

Note that the test is a right tailed test. We will use the following statistic:

T = \frac{\mu-350000}{S/\sqrt{n-1}} \sim t_{n-1}

Now, the standard deviation of the price is 1178732.5. Hence the observed statistic value becomes:

t = \frac{10048.2\cdot(29)^{1/2}}{117832.5} \approx 0.459

Now,the p-value in this case would be:

= P(t_{29} > 0.459) \approx 0.325

Hence, at 95% confidence level, we can say that we fail to reject the null hypothesis.

The following code is used for calculation:

> mean(data$Price)
[1] 360048.2
> sd(data$Price)
[1] 117832.5
> pt(0.459,29,lower.tail=FALSE)
[1] 0.324828

Now, we will analyze the regression between price and space. The analysis in R is given below:

> model = lm(Price~Size,data=data)
> summary(model)

Call:
lm(formula = Price ~ Size, data = data)

Residuals:
   Min     1Q Median     3Q    Max 
-88801 -38584   3610  34405  95796 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 17838.578  29916.627   0.596    0.556    
Size           98.440      8.221  11.975 1.57e-12 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 48470 on 28 degrees of freedom
Multiple R-squared:  0.8366,    Adjusted R-squared:  0.8308 
F-statistic: 143.4 on 1 and 28 DF,  p-value: 1.566e-12

From the summary of the result, we can see that the linear regression equation between price and size is

Price = 17838.578+98.440\cdot Size

and the t test for coefficient of Size returns a value lesser than 0.05. Hence, we can say that the slope is non zero. Also the R squared statistic implies that the regression model explains 83.66% of the variation in Price, thus making the model good enough

Add a comment
Know the answer?
Add Answer to:
Create a hypothesis test question and show all the steps to solve it. Example: You found...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT