+ Reply to Thread
Results 1 to 11 of 11

Thread: Find E(X) and VAR (X)

  1. #1
    Points: 571, Level: 11
    Level completed: 43%, Points required for next Level: 29

    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Find E(X) and VAR (X)




    Question is:
    There is one error in one of five blocks of program. To find the error, we test three randomly selected blocks. Let X be the number of error in these three blocks. Compute E(X) and VAR(X)

    My solution:
    P(X=0)=4/5
    P(X=1)=1/5

    There is possible no error will be found, or one error will be find in three possible ways
    X= 0 -> 4/5*4/5*4/5
    X = 1 -> 3*(4/5*4/5*1/5)
    by my calculation I would get E(X) = 0.384,

    however in book result is said to be E(x) = 0.6

    where I make mistake, please folks help me

  2. #2
    Point Mass at Zero
    Points: 13,828, Level: 76
    Level completed: 45%, Points required for next Level: 222
    ledzep's Avatar
    Location
    Berks,UK
    Posts
    684
    Thanks
    188
    Thanked 143 Times in 139 Posts

    Re: Find E(X) and VAR (X)

    probability(error in one block)= 1/5
    \Rightarrow probability(error in 3 blocks)= 3*(1/5)= 0.6

    Let 0= N0 error
    1= error

    \begin{tabular}{|r|c|l|}\hlineX & 0 &1 \\\hlineProb(x)&0.4&0.6\\\hline\end{tabular}

    Hence, E(x)= 0.4*0 + 0.6*1=0.6
    Last edited by ledzep; 01-15-2012 at 09:20 AM.
    Oh Thou Perelman! Poincare's was for you and Riemann's is for me.

  3. #3
    TS Contributor
    Points: 22,410, Level: 93
    Level completed: 6%, Points required for next Level: 940

    Posts
    3,020
    Thanks
    12
    Thanked 565 Times in 537 Posts

    Re: Find E(X) and VAR (X)

    By assuming independent and identical probability of having error in the blocks, the number of blocks have error in any 3 randomly selected blocks have a Binomial distribution.

  4. #4
    Points: 571, Level: 11
    Level completed: 43%, Points required for next Level: 29

    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Find E(X) and VAR (X)

    Ok, then E(X) = n*p , the answer is correct,
    however, when I calculate VAR(X) = n*p*q (using the same Binomial distribution) = 0.48, when in book is said it have to be 0.24, what is wrong in this time?

  5. #5
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Find E(X) and VAR (X)

    n is the number of trials (how many observations were collected). In your case it's 1. You can also think of n as the maximum value the binomial observation could take. n isn't the number of distinct values the outcome can take (which is what I think you thought it should be).

  6. #6
    Points: 571, Level: 11
    Level completed: 43%, Points required for next Level: 29

    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Find E(X) and VAR (X)

    now i really get lost, if n= 1, then previously calculated E(X) is wrong, also having n=1 , the VAR(X) = 0.16, what is also wrong.....
    i will try to write what i know for sure:
    I have to use Binomial distribution,
    so my data is: p = 1/5, q = 4/5, n= ? E(X) = np and VAR(X)=npq, question is is n = 1 or 3, and how to get correct answers?

  7. #7
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Find E(X) and VAR (X)

    There are a lot of numbers flying around and none of this really seems consistent. I'm partially to blame because I skimmed over the first post and thought the values we were working with were the ones ledzep posted (p = .6, n = 1). So I was working with that situation.

    So in that situation (the numbers ledzep posted) if we had a sample size of 1 with success probability of .6 then:
    p = .6
    n = 1
    E(X) = n*p = 1*.6 = .6
    Var(X) = n*p*q = 1*.6*.4 = .24

    If we were using n = 2 with success probability of .6 we would have:
    P(X = 0) = .16
    P(X = 1) = .48
    P(X = 2) = .36

    p = .6
    n = 2
    E(X) = 2*.6 = 1.2
    Var(X) = 2*.6*.4 = .48

  8. #8
    Points: 571, Level: 11
    Level completed: 43%, Points required for next Level: 29

    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Find E(X) and VAR (X)

    sorry with that number mess, but I have 5 systems, I check only 3 of them, possibility find error is 0.2, don't find 0.8
    Corresponding to your calculations:
    E(X) = 3* 0.2 = 0.6 - it is correct
    VAR(X)= 3*0.2*0.8= 0.48 (and should be 0.24, what's that a question ))
    So why I am asking to help me, because I don't understand where is problem

  9. #9
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Find E(X) and VAR (X)

    Ah. I really should have read more carefully. The reason is that we were working with the binomial distribution when this is NOT a problem for the binomial distribution. (When the sample size is 1 it doesn't matter though).

    We're working with the hypergeometric distribution:
    http://en.wikipedia.org/wiki/Hyperge...c_distribution

    With N = 5, n = 3, m = 1.

  10. The Following 2 Users Say Thank You to Dason For This Useful Post:

    ledzep (01-15-2012), smske (01-15-2012)

  11. #10
    Points: 2, Level: 1
    Level completed: 3%, Points required for next Level: 48

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find E(X) and VAR (X)

    hi
    here we have three trial that are not independent.the answer 0.6 is correct but not in that way other people looking at it.here this three trial are disjoint from each other not independent because if one of the blocks out of three has an error we could definitely that the others doesn't so here .the probability that we have an error in out three chosen blocks is 1/5+1/5+1/5 =3/5
    and because of that e[x]=0*2/5+1*3/5=3/5=0.6
    and with this expectation we obtain
    var[x]=e[x^2]-(e[x])^2=3/5-9/25=6/25=.24

  12. #11
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Find E(X) and VAR (X)


    hi,
    a maybe simpler way to look at the problem is by turning ito an urn model: we have 5 urns, 4 of which have white balls and one has a black ball.If you pick 3 urns at random, what is the probability that the black ball is not picked ?

    P= (combinations of 3 out of 4)/(combinations of 3 out of 5)
    P= (4!/3!)/(5!/3!2!)=4!2!/5!=2/5 which is our P(0).
    P(1) is 1-P(0)=3/5.

    regards

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats