f1=function(x){(3/16)*(1+((5*(x-38)^2)/80))^(-(5/2))}
integrate(f1,-Inf,Inf)
## 1 with absolute error < 5.3e-05
Yes, the function is a PDF because the integral from infinity to negative infinity is equal to zero
f1m=function(x){((3/16)*(1+((5*(x-38)^2)/80))^(-(5/2)))*x}
integrate(f1m,-Inf,Inf)
## 38 with absolute error < 0.0021
f1v=function(x){((3/16)*(1+((5*(x-38)^2)/80))^(-(5/2)))*(x-38)^2}
integrate(f1v,-Inf,Inf)
## 8 with absolute error < 6.7e-05
x<-c(0,0,10,110)
y<-c(0,1/20,1/200,0)
plot(x,y,type="s")
points(0,1/20,pch=16)
points(110,1/200,pch=16)
points(10,1/20,pch=1)
points(10,1/200,pch=16)
The random variable X reprisents the maximum distance people are willing to travel for food in km.
The expected value of the random variable X is 10 since the probability to either side is 0.5
Unknown
1.25 calls per hour.
1.25
set.seed(2)
x1<-table(rpois(100000,1.25))
plot((x1/100000), type = "p", col = "red",main = "X1")
set.seed(2)
x2<-table(rpois(100000,1.25))
plot((x2/100000), type = "p", col = "red",main = "X2")
E(x1)=1.25 and E(x2)=1.25 therefore E(x1+x2)=2.5
Var(x1)=1.25 and Var(x2)=1.25 therefore Var(x1+x2)=2.5
A2=(x1+x2)/2
E(A2)=(x1+x2)/2=E(x1+x2)/2 therefore E(A2)= 1.25
Var(A2)=(x1+x2/2=E(x1+x2)/2=Var(x1+x2)/(2^2) therefore A2= 0.625
plot((A2/100000), type = "p", col = "red",main = "A2")
E(A24)=(x1+…+x24)/2=E(x1+…+x24)/24 therefore E(A24)= 1.25
Var(A24)=(x1+…+x24)/2=E(x1+…+x24)/24=Var(x1+x2)/(24^2) therefore Var(A24)= 0.0520833
set.seed(2);x1<-table(rpois(100000,1.25))
set.seed(5);x2<-table(rpois(100000,1.25))
set.seed(7);x3<-table(rpois(100000,1.25))
set.seed(5);x4<-table(rpois(100000,1.25))
set.seed(9);x5<-table(rpois(100000,1.25))
set.seed(11);x6<-table(rpois(100000,1.25))
set.seed(39);x7<-table(rpois(100000,1.25))
set.seed(21);x8<-table(rpois(100000,1.25))
set.seed(52);x9<-table(rpois(100000,1.25))
set.seed(49);x10<-table(rpois(100000,1.25))
set.seed(5);x11<-table(rpois(100000,1.25))
set.seed(37);x12<-table(rpois(100000,1.25))
set.seed(29);x13<-table(rpois(100000,1.25))
set.seed(21);x14<-table(rpois(100000,1.25))
set.seed(5);x15<-table(rpois(100000,1.25))
set.seed(7);x16<-table(rpois(100000,1.25))
set.seed(2);x17<-table(rpois(100000,1.25))
set.seed(10);x18<-table(rpois(100000,1.25))
set.seed(17);x19<-table(rpois(100000,1.25))
set.seed(21);x20<-table(rpois(100000,1.25))
set.seed(27);x21<-table(rpois(100000,1.25))
set.seed(31);x22<-table(rpois(100000,1.25))
set.seed(37);x23<-table(rpois(100000,1.25))
set.seed(45);x24<-table(rpois(100000,1.25))
A24=(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12+x13+x14+x15+x16+x17+x18+x19+x20+x21+x22+x23+x24)/24
A24
##
## 0 1 2 3 4
## 28723.875000 35740.000000 22345.916667 9311.250000 2955.208333
## 5 6 7 8
## 735.875000 152.166667 31.291667 4.416667
plot((A24/100000), type = "p", col = "red",main = "A24")
As “i” increases, the plot of A in staying constant because the mean does not change from hour to hour.