In [2]:
dnorm(0, mean=0, sd=1)
pnorm(0, mean=0, sd=1)
qnorm(0.5, mean=0, sd=1)
rnorm(5, mean=0, sd=1)
Out[2]:
Out[2]:
Out[2]:
Out[2]:
In [4]:
options(jupyter.plot_mimetypes = 'image/png')
x=rnorm(10000, mean=0, sd=1)
plot(density(x))
In [18]:
dchisq(0, df=10)
pchisq(0, df=10)
qchisq(0.5, df=10)
rchisq(5, df=10)
Out[18]:
Out[18]:
Out[18]:
Out[18]:
In [19]:
x=rchisq(10000, df=10)
sx=(x-mean(x))/(sd(x)/sqrt(10000))
plot(density(sx))
P(A) = 사상 A에 속하는 원소의 갯수/표본공간의 전체 원소의 갯수
In [ ]:
options(jupyter.plot_mimetypes = 'image/png')
x=c(6,2,4,8,10) # 5 persons working years
mean(x) # mean
sum((x-mean(x))^2)/length(x) # variance σ2
hist(x)