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(b≤t|a)=θ(t−2a)t−aπ. for a≤π3
By the product rule, we can differentiate and get this, where δ is the Dirac delta function.
p(b|a)=δ(t−2a)t−aπ+θ(t−2a)1π.
p(a)=2π, so we integrate to get p(b)=π2∫0p(a)p(b|a)da.
Since the function change at t−2a, let y=t−2a
dy−2=da
When a=0, y=t.
When a=π2, y=t−2π.
p(b)=π2∫0p(a)p(b|a)da=π2∫02π(δ(t−2a)t−aπ+θ(t−2a)1π)da=t−π∫t2π(δ(y)t+y2π+θ(y)1π)dy−2=t∫t−π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.
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(b≤t|a)=θ(t−2a)t−aπ. for a≤π3
By the product rule, we can differentiate and get this, where δ is the Dirac delta function.
p(b|a)=δ(t−2a)t−aπ+θ(t−2a)1π.
p(a)=2π, so we integrate to get p(b)=π2∫0p(a)p(b|a)da.
Since the function change at t−2a, let y=t−2a
dy−2=da
When a=0, y=t.
When a=π2, y=t−2π.
p(b)=π2∫0p(a)p(b|a)da=π2∫02π(δ(t−2a)t−aπ+θ(t−2a)1π)da=t−π∫t2π(δ(y)t+y2π+θ(y)1π)dy−2=t∫t−π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