In: Statistics and Probability
Assume you have noted the following prices for books and the number of pages that each book contains.
Book |
Pages (x) |
Price (y) |
A |
500 |
$7.00 |
B |
700 |
7.50 |
C |
750 |
9.00 |
D |
590 |
6.50 |
E |
540 |
7.50 |
F |
650 |
7.00 |
G |
480 |
4.50 |
Required:
a. |
Perform an F test and determine if the price and the number of pages of the books are related. Let a = 0.01. |
b. |
Perform a t test and determine if the price and the number of pages of the books are related. Let a = 0.01. |
c. |
Develop a 90% confidence interval for estimating the average price of books that contain 800 pages. |
d. |
Develop a 90% confidence interval to estimate the price of a specific book that has 800 pages. |
.
Please solve it without excel formula
## Using R software
Pages_x=c(500,700,750,590,540,650,480)
Price_y=c(7.00,7.5,9,6.5,7.5,7,4.5)
## a)
model_aov=aov(Price_y~Pages_x)
summary(model_aov)
# The calculated F test statistic is 6.439 with corresponding
p-value 0.052.
# The p-value is greater than 0.01 significance level. Hence, we
can conclude
# that the price and the number of pages of the books are not
related.
## b)
model_lm=lm(Price_y~Pages_x)
summary(model_lm)
# The calculated F test statistic is 2.538 with corresponding
p-value 0.052.
# The p-value is greater than 0.01 significance level. Hence, we
can conclude
# that the price and the number of pages of the books are not
related.
## c.
predict(model_lm, data.frame(Pages_x=800), level=1-0.10, interval =
"confidence")
# 90% confidence interval for estimating the average price of
books
# that contain 800 pages is (8.967278, 10.69882).
## d.
predict(model_lm, data.frame(Pages_x=800), level=1-0.10, interval =
"prediction")
# 90% confidence interval to estimate the price of a specific
book that
# has 800 pages is (8.967278, 11.59459).
# End