chi-square interpolation

Discussion in 'CT3' started by kartik_newpro, Jul 7, 2011.

  1. kartik_newpro

    kartik_newpro Member

    I have 2 queries regarding using interpolation to calculate chi-square probabilities. Assume chi-square = X for convenience

    1. P(X4 > 1.064)

    The chi-square percentage point tables directly shows this as 90%. But if I interpolate using the probability tables I get a different answer. Just tell me if interpolation is incorrect.

    P(X < 1.0) = 0.0902 and P(X < 1.5) = 0.1734

    0.0902 + (1.5 - 1.064)/(1.5 - 1.0) * (0.1734 - 0.0902) = 0.1628

    P(X4 > 1.064) = 1 - 0.1628 = 0.8372 or 83.72%.

    Where have I gone wrong?


    2. P(X29 < 56.84)

    From the tables, P(X > 52.34) = 0.05 and P(X > 58.30) = 0.01

    Therefore,

    0.01 + (58.30 - 56.84)/(58.30 - 52.34) * (0.05 - 0.01)

    This doesnt give the right answer. What is the right way to interpolate?

    Thanks
     
  2. kartik_newpro

    kartik_newpro Member

    Just came across one more doubt and did not want to create a new thread for it.

    Suppose X has a Poisson distribution and Y has a geometric distribution and X and Y are independent, then

    Is P[X - Y] = P[X=x] - P[Y=y]?

    Awaiting reply for both the doubts.

    Hope I am not getting on the nerves of people here. I just ask too many doubts :p
     
  3. Margaret Wood

    Margaret Wood Member

    Hi

    You've made a mistake in your interpolation in your first query.

    It should be:

    0.0902 + (1.064 -1)/(1.5 - 1.0) * (0.1734 - 0.0902) = 0.1008

    In your second query, your interpolation is fine, but you've used the wrong probability.

    P(X29 > 52.34) = 0.005 and P(X29 > 58.30) = 0.001.

    You might try drawing a line and labelling the end points with the two x values and the two probabilities. You can then put in the point you know, say the x point that lies somewhere between the two end points. You are trying to determine the unknown probability by splitting the difference in the probabilities in the same ratio as the x point splits the difference in the x values.
     
  4. Margaret Wood

    Margaret Wood Member

    In response to your other query about P(X-Y) ...

    No, you can't say P(X-Y) = P(X=x) - P(Y=y).

    You will need to specify the exact values for X-Y and work out the ways this could happen. For example, if X = score on a die and Y is the number of heads when a coin is tossed twice, then X can take values 1,2,3,4,5,6 and Y can take values 0,1,2.

    So X-Y could take on the values -1,0,1,2,3,4,5,6.

    P(X-Y=-1) = P(X=1 and Y=2) = P(X=1) x P(Y=2) since they're independent, ie 1/6 x 1/4. The probability that X-Y takes on some values is more complicated because the value can happen in more than one way. For example, P(X-Y=0) = P(X=1 and Y=1) + P(X=2 and Y=2) etc.
     
  5. kartik_newpro

    kartik_newpro Member

    Thanks a lot Margaret. That was super helpful.

    About the second query - actually that was concerning a question in the May 2011 Exam. The question says -

    X ~ Poi(2) and Y has geometric distribution with mean 2 where y = 0,1,2,..... Also X and Y are independent. Prove:

    P[X=Y] = 1/3 * exp(-2/3)

    I am not aware of any method other than finding P[X-Y=0]. But couldn't do it anyway :eek:

    Can you help me on this?
     
  6. didster

    didster Member

    In general

    P(X=Y) = sum over all a>=0 { P(X=a | Y=a) * P (Y=a) } ...(1)

    since X,Y independent

    P(X=a|Y=a) = P(X=a)

    Plug in the constants provided to get a sum over all a of
    (e^-2 * 2^a /a!) * ((1/3)*(2/3)^a )

    or

    e^-2 (1/3) * sum over all a { (4/3)^a /a!} ....(2)

    now e^x = sum over all a>=0 {x^a /a!} Taylor series

    so the second bit of (2) is simply e^(4/3)

    Thus (2) becomes
    (1/3) e^-2 e^(4/3) = (1/3) e^(-2/3)


    Alternatively (if you're not familiar with taylor series) you could note that each term of the second bit of 2 is e^(4/3) times the pdf of a Poisson dist with mu = 4/3; factor it out and sum the probabilities to get 1 and same results

    the PDF of X-Y is a bit more complicated.
    basically go down a similar route

    P(X-Y=b) = sum over all a {P(X=a+b | Y=a) * P(Y=a)}
     
  7. kartik_newpro

    kartik_newpro Member

    Thanks didster. I understood that well.

    But E[Y] = 2. And the mean of geometric distribution is 1/p.

    Then how come the PF is (1/3)*(2/3)^a ?

    Shouldn't p be equal to 1/2 ?
     
    Last edited by a moderator: Jul 14, 2011
  8. didster

    didster Member

    Since Y starts at 0, mean is q/p.
     
  9. kartik_newpro

    kartik_newpro Member

    Oh Yeah! Gee!

    Thanks didster.
     
  10. You could just use the stats function in your calculator. I find it a lot quicker... :cool:
     

Share This Page