Question #190668

1.  (6 marks) A random variable, X, measures a European football team’s net goal differ ence (goals scored minus goals conceded) for matches in a semi-professional league. The values X =-1, 0, 1 indicate negative, null or positive goal difference, respectively. X is thought to follow the probability distribution below:

 



 

a.      (2 marks) Complete the table below by computing the values of the probability mass function, P (x), and the cumulative distribution function, F (x).                   

 

b.     (2 marks) Compute the expected value of X by writing an R function to do the calculation (show your R code).



Expert's answer

(a)PX(x)=(xi+2)236(a) P_{X}(x)=\dfrac{(x_i+2)^2}{36}


F(X)=P(X≤x)=∫0xP(X)dx=∫0xx+2)212dx=(x+2)336∣0x=(x+2)336−836=x3+8+4x2+8x−836=x3+4x2+8x36F(X)=P(X\le x)=\int_{0}^x P(X)dx \\[9pt] =\int_{0}^x \dfrac{x+2)^2}{12}dx \\[9pt] =\dfrac{(x+2)^3}{36}|_{0}^x =\dfrac{(x+2)^3}{36}-\dfrac{8}{36}\\[9pt]=\dfrac{x^3+8+4x^2+8x-8}{36}\\[9pt]=\dfrac{x^3+4x^2+8x}{36}



(b) The expected value is found as


E(X)=ΣXP(X=x).=ΣX(x+2)214⇒E(X)=0.5714286XE(X) = ΣXP(X = x).=Σ_{X}\dfrac{(x+2)^2}{14} \Rightarrow E(X) = 0.5714286 X


The R function to calculate the above expected value below.



EX <- function ()

{

X <- c(-1,0,1)

PX <- (X+2)^2/14

EX <- sum(X*PX)

return(EX)

}

E <- EX()




LATEST TUTORIALS
APPROVED BY CLIENTS