*ANSWER ONLY IF YOU KNOW RSTUDIO* Now You Try! Use the code in the file Duplex.R
ID: 3359193 • Letter: #
Question
*ANSWER ONLY IF YOU KNOW RSTUDIO*
Now You Try!
Use the code in the file Duplex.R to conduct a hypothesis test to determine if the sale prices of duplexes are normally distributed.
Load the code into RStudio and run through it. You will not need to modify the code to answer the questions below.
Answer the following questions:
a.How many observations are in the data set Duplex?
b. How many observations do we EXPECT in the region between the mean and 0.75 standard deviations above the mean for the sale prices in the Duplex data set? Round your answer to one decimal place.
c.How many observations do we OBSERVE in the region between the mean and 0.75 standard deviations above the mean for the sale prices in the Duplex data set?
d. What is the test statistic? Round your answer to two decimal places.
e.What is the p-value? Round your answer to four decimal places.
Explanation / Answer
Solutiona
a.How many observations are in the data set Duplex?
dim(duplex)
109 observations
SolutionB;
s=sd(Duplex$SalePrice)
s=39498.97
m=mean(Duplex$SalePrice)
m=139808.9
mean-0.75(stddev)=139808.9-0.75(39498.97)=110184.7
mean+0.75(stddev)=139808.9+0.75(39498.97)=169433.1
given distr is normal distribution with mean and sd=139808 And9,39498.97
using TI 83 calc find prob:
normalcdf(110184.7,169433.1,139808.9,39498.97)
=0.5467
total observations=109
Expected=np=109*0.5467=
=59.59
=60
So 60 observations
we EXPECT in the region between the mean and 0.75 standard deviations above the mean for the sale prices in the Duplex data set
ANSWER:60
Solutionc:
OBSERVE<-sum( 110184.7 < Duplex$SalePrice & Duplex$SalePrice < 169433.1 )
OBSERVE
ANSWER:68
68 observations we OBSERVE in the region between the mean and 0.75 standard deviations above the mean for the sale prices in the Duplex data set.
Solutiond:
chi sq=11.86
Solutione:
p=0.0367
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.