Statistics Problem By Matlab

profilesa3p14

1A. Matlab. 

Let X ~ Binomial (n = 6, p = 0.4) 

Randomly generate N = 10000 X-values. 

Matlab code: X = random(‘bino’, n, p, [N,1]) 


Let Y ~ Binomial (n = 8, p = .25) 

Randomly generate N = 10000 Y-values. 


Let W = X + Y (so in vector form: ????=[????????]=[????????+????????]) 

Create a normalized histogram of W. Note: possible values of W range from 0 to 14. 


Use your results to estimate P(W = 5). 


1B. Calculate the true P(W = 5). Note: X and Y are independent. 

Compare your estimate in part A to the true probability computed in part B. 

    • 8 years ago
    • 20
    Answer(1)

    Purchase the answer to view it

    blurred-text
    • attachment
      math.m
    • attachment
      PartA.docx
    • attachment
      PartA2.docx