4. To standardize a data set, x, we often use a z transfortnation, W where rple
ID: 3370315 • Letter: 4
Question
4. To standardize a data set, x, we often use a z transfortnation, W where rple To standardize a population with variable X we often use a Z transformation, where Answer the following: (a) Predict the output from Line A below! > head (ådt) RIVER MILE SPECIES LENGTH WEIGHT DDT 1 FCM 5 CCATFISH 42.5 732 10 FCM 2 FCM 5 CCATFISH 44.0 795 1 3 FCM 5 CCATFISH 41.5 547 23 4 FCM 5 CCATFISH 39.o 465 21 5 FCM 5 CCATFISH 50.5 1252 50 6 FCM 5 CCATFISH 52.0 1255 150 > x-ddt $WEIGHT >z(x-mean (x))/sd (x) > round (mean(z)"2,4) # Line A (b) Predict the output of Line B below! > head (ddt) RIVER MILE SPECIES LENGTH WEIGHT DDT River) Mlle) Sfucies) lendh)?? 0p1 i FCH 5CCATF?SH 42.5 73210 2 FCM 5 CCATFISH 44.0 795 16 3 FCM 5 CCATFISH 41.5 547 23 4 FCM 5 CCATFISH 39.0 465 21 5 FCM 5 CCATFISH 50.5 1252 50 6 FCM 5 CCATFISH 52.0 1255 150 > x-ddtSDDT > z- (x-mean (x))/sd (x) > round (var(z),4) # Line B E 3293 Exam 1 Chapters 1-5 Page 6 of 10Explanation / Answer
a) X: Weight
R codes
x<-c(10,16,23,21,50,150)
z<-(x-mean(x))/sd(x)
z
var(z)
round(var(z)^2,4)
R output
> x<-c(10,16,23,21,50,150)
> z<-(x-mean(x))/sd(x)
> z
[1] -0.65731901 -0.54463575 -0.41317195 -0.45073304 0.09390272 1.97195704
> var(z)
[1] 1
> round(var(z)^2,4)
[1] 1
The output of line A is 1.
----------------------------------------------------------------------------------------------------------------------------
b) X : DDT
R codes
x<-c(10,16,23,21,50,150)
z<-(x-mean(x))/sd(x)
z
mean(z)
round(mean(z)^2,4)
R output
> x<-c(10,16,23,21,50,150)
> z<-(x-mean(x))/sd(x)
> z
[1] -0.65731901 -0.54463575 -0.41317195 -0.45073304 0.09390272 1.97195704
> mean(z)
[1] -1.850372e-17
> round(mean(z)^2,4)
[1] 0
The output of line B is 0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.