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
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.
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?
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).
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?
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
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
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.
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
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
Tweet |