Professional Documents
Culture Documents
T Seq Seq: "Red" "Red"
T Seq Seq: "Red" "Red"
Quiz
Suppose a sample of size 3 is taken from a uniform distribution over the interval [0 , ], for the purpose of
testing
H0 : = 1
versus
(1)
H1 : < 1
(2)
In [59]: y<-y1+y2+y3
hist(y,breaks=80,prob=T)
z1<-seq(0,theta,0.01)
z2<-seq(theta,2*theta,0.01)
z3<-seq(2*theta,3*theta,0.01)
lines(z1,z1^2/(2*theta^3),type="l",lty=1,col="red",xlim=c(0,theta))
lines(z2,(-2*z2^2+6*theta*z2-3*theta^2)/(2*theta^3),type="l",lty=1,col="blue",xlim=c(theta,2*th
lines(z3,(3*theta-z3)^2/(2*theta^3),type="l",lty=1,col="red",xlim=c(2*theta,3*theta))
w2
23
w2 + 6w 32
fW (w; ) =
23 2
(w
3)
0w<
w < 2
2 w 3
otherwise
We need to integrate the pdf from 0 to 0.53. In this region the pdf is given by
Z
=
0
0.6
w2
dw = 0.036
2
(3)
w2
given = 1.
23
(4)
In [3]: library(png)
img <- readPNG(3-random.png)
grid::grid.raster(img)
E(Yi ) =
2
and
2
E(Yi2 ) =
3
So, we have
2
12
Var(Yi ) =
The expected value of Z is given by
3
X
i=1
(5)
(6)
Var(W )
3
X
2
12
i=1
(7)
2
4
(8)
y w
w
0.6 1.5
=
= 1.8
0.5
= 0.0359
=
In [13]: pnorm(0.6,3/2,1/2)
Out[13]:
0.0359303191129258
If = 0.5 then we have W N (3/4, 1/16)
=
=
y w
w
0.6 0.75
= 0.6
0.25
1 0.276 = 0.7257
In [1]: 1-pnorm(0.6,3/4,1/4)
Out[1]:
0.725746882249926
In [4]: img1 <- readPNG(31-random.png)
grid::grid.raster(img1)
(9)
(10)
(11)
In [ ]: