ce llt25,4 . i l b954-o 14323-10.18615-4 M: lease Cylinder Do - 11293-3 8sst 394
ID: 3374867 • Letter: C
Question
ce llt25,4 . i l b954-o 14323-10.18615-4 M: lease Cylinder Do - 11293-3 8sst 3942 19635 ers 2. Cruise CASe.LBS Modet Tye Buick Century Sedan Ce^tuny Sedan L aCrosse Se Lac rosse Seda Buice-B Buick c uick-D ins Ke data se4s, use R Suntax to do Ke analysis Are ttere any re lationship betueen can you explain it hy introducins te variables price and milease I Fso raph and boxplot to indicate te relationship hehJee Price and milease Drav a boxplot t indicate ne five number Summary For te Price of te cars 4)1 According h,fte analysis, what is p va ke ? ??.plainte conclusan b ased on P valae Te tere any missing values hos you wil handleExplanation / Answer
R-code:
1)
> price=c(12514.1,16954.0,14323.10,18615.4,11243.3)
> mileage=c(9331,8554,13992,15614,19634)
> cylinder=c(6,6,6,6,4)
> doors=c(4,2,4,4,4)
> cruise=c(1,1,1,1,0)
> leather=c(1,1,0,1,0)
> sound=c(1,1,1,0,0)
> y=cor(price,mileage,method="kendall")
> y
[1] -0.2
there is negative correlation between price and mileage.
2)
> r=boxplot(price,mileage,xlab="price of car",ylab="mileage of car")
> r
$stats
[,1] [,2]
[1,] 11243.3 8554
[2,] 12514.1 9331
[3,] 14323.1 13992
[4,] 16954.0 15614
[5,] 18615.4 19634
$n
[1] 5 5
$conf
[,1] [,2]
[1,] 11185.88 9552.448
[2,] 17460.32 18431.552
$out
numeric(0)
$group
numeric(0)
from the boxpllot we see that there is no outlier obtain in the graph.and there is negative correlation obtain between price and mileage.
> y=plot(price,mileage)
> y
NULL
it gives scatter plot and it also shows there is -ve relationship obtain.
3)
> b=boxplot(price)
> b
$stats
[,1]
[1,] 11243.3
[2,] 12514.1
[3,] 14323.1
[4,] 16954.0
[5,] 18615.4
$n
[1] 5
$conf
[,1]
[1,] 11185.88
[2,] 17460.32
$out
numeric(0)
$group
numeric(0)
$names
[1] "1"
4)
I do thye t test to test the relation between the variables.
> p=t.test(price,mileage)
> p
Welch Two Sample t-test
data: price and mileage
t = 0.52961, df = 6.9624, p-value = 0.6128
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-4527.887 7137.847
sample estimates:
mean of x mean of y
14729.98 13425.00
here p value=0.6128
0.6128>0.05
p value>0.05
then p value shows the strong evidence against alternative hypothesis.so we accept the null hypothesis.
5)
if there is missing value obtain in the data .
then there are different methods to handle missing values.
1. remove tuple of missing value.but using this some information will be remove.
2.replace the missing value by bin.
3. replace missing value by mean of that variable
4.replace missing value by median of that variable.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.