myCompiler
English
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
Q
@Quantam_harsh
MEAN MEASURE OF CENTRAL TENDENCY
R
3 years ago
x=c(0,1,2,3) f=c(8,11,5,1) y=rep(x,f) mean=sum(y)/length(y) mean mean(y) median(y) mid=seq(147.5,182.5,5) f=c(4,6,28,58,64,30,5,5)
corelation coefficient
R
3 years ago
x=c(23,27,28,28,29,30,31,33,35,36) y=c(18,20,22,27,21,29,27,29,28,29) cor(x,y) cor(x,y,method="pearson") cor(x,y,method="spearman") #find rank coreelation coefficient of the following x=c(44,49,52,54,47,76,65,60,63,58,50,67) y=c(48,55,45,60,43,80,58,50,77,46,47,65) cor(x,y,method="spearman")
experiment 6
R
3 years ago
n1=75 n2=75 p1=10/100 p2=9/100 #two tailed test #two sample test #Z=(p1-p2)/sqrt(P*Q)*(1/n1+1/n2)) P=(n1*p1+n2*p2)/(n1+n2) Q=1-P Z=(p1-p2)/sqrt((P*Q)*(1/n1+1/n2))
normal distribution
R
3 years ago
#normal distribution #dnorm(x,mean,sd) #create a sequence of no btw -10 and 10 incrementing by 0.1 x=seq(-10 ,10 ,by=0.1) #chooisng mean as 2.5 and sd=0.5 y=dnorm(x,2.5,0.5) plot(x,y,type="l",col="pink") x=seq(-10,10,0.2) y=pnorm(x,2,5,2)
poisson distribution exp-4
R
3 years ago
#poisson distribution #dpois(x,lambda,log.p=false) #prob of x=5 lambda=2.6 dpois(5,2.6) #for x>=2; 1-ppois(1 ,2.6) #find p(3<=x<=6) dpois(3,2.6)+dpois(4,2.6)+dpois(5,2.6)+dpois(6,2.6)
probability distribution
R
3 years ago
#R has four inbuilt function to generate binomial distribution #dbinom( x ,size,prob) it is used to find probability of complete value x=3 ,x=5 #x =value to find ,size= no. of trils ,prob=prob of success dbinom(3 ,size=20 ,prob=1/6) #for values of all 0,1,2,3 dbinom(0:3,size=20 ,prob=1/6) #pbinom command give us values for the probability distribution function of X f(x) #x<=3
Previous
Next page