online advertising
Loading [MathJax]/jax/output/HTML-CSS/jax.js

Sunday, February 14, 2016

Duck Pond Chance (4)

Last post we computed the CDFs for b condition on A, let's compute the PDFs now.

To efficiently compute the derivatives, it is much easier if we have good notations instead of messing with all the cases, so Heaviside step function.

P(bt|a)=θ(t2a)taπ. for aπ3

By the product rule, we can differentiate and get this, where δ is the Dirac delta function.

p(b|a)=δ(t2a)taπ+θ(t2a)1π.

p(a)=2π, so we integrate to get p(b)=π20p(a)p(b|a)da.

Since the function change at t2a, let y=t2a

dy2=da
When a=0, y=t.
When a=π2, y=t2π.

p(b)=π20p(a)p(b|a)da=π202π(δ(t2a)taπ+θ(t2a)1π)da=tπt2π(δ(y)t+y2π+θ(y)1π)dy2=ttπ1π(δ(y)t+y2π+θ(y)1π)dy

The first term is easy, using the sampling property of the delta function, the integral is simply t2π2 if t[0,π], or 0 otherwise.
The second term is slightly more complicated, it is 0 if t<0, tπ2 if t[0,π] and 1π if t>π.
Although the integration seems to show p(b)=1π for all t>π, but in fact the maximum value of t is simply 4π3, as we already know it caps there. As a sanity check, the area under curve is 1, and the area under curve for t[0,π]=34, which is correct.

EDIT: There are at least two problems I spotted. First, the CDF should also include a term to cancel out the linear growth when it reaches a+π. Second, the CDF only applies up to aπ3.

No comments:

Post a Comment