#BIOSTATISTICS 020 #DESCRIPTIVE STATISTICS: #CALCULATIONS: 2+2 35/5 6*5 pi #ASSIGNMENT: var=78 var2=6*(7/9) var3=(5+3)/(sqrt(pi)) #EVALUATION: var var2 var3 #INPUT DATA: I1=read.table(file.choose()) I1 #EVALUATION OF I1 I2=read.table("iris.txt") I2 #EVALUATION OF I2 #VARIABLE ASSIGNMENTS: Iris=I2 SL=Iris[,1] SL=Iris$Sepal.Length SW=Iris$Sepal.Width PL=Iris$Petal.Length PW=Iris$Petal.Width Species=Iris[,5] #EVALUATION: Out=cbind(SL,SW,PL,PW,Species) Out #DESCRIPTIVE STATISTICS: length(SL) length(Iris$Sepal.Width) length(Iris[,3]) length(PW) n=length(SL) n SL[2] SL[3] #NOTE INDEX RANGE HERE! Iris[3,1] Xbar= (1/n)*sum(SL) Xbar mean(SL) median(SL) geom_meanSL = prod(SL)^(1/length(SL)) geom_meanSL harm_meanSL = n/(sum(1/SL)) harm_meanSL #VARIANCE: var(SL) #SAMPLE VARIANCE Population_VarSL=((n-1)/n)*var(SL) Population_VarSL #POPULATION VARIANCE #LINEAR TRANSFORMATION OF MEAN AND VARIANCE b=32 c=1.8 SLt=c*SL+b mean(SLt) var(SLt)