Menu Close

You-have-a-1×1-cm-square-If-you-pick-two-random-points-inside-the-square-what-is-the-average-distance-between-those-points-




Question Number 6609 by Temp last updated on 05/Jul/16
You have a 1x1 cm square. If you pick  two random points inside the square,  what is the average distance between  those points?
$$\mathrm{You}\:\mathrm{have}\:\mathrm{a}\:\mathrm{1×1}\:\mathrm{cm}\:\mathrm{square}.\:\mathrm{If}\:\mathrm{you}\:\mathrm{pick} \\ $$$$\mathrm{two}\:\mathrm{random}\:\mathrm{points}\:\mathrm{inside}\:\mathrm{the}\:\mathrm{square}, \\ $$$$\mathrm{what}\:\mathrm{is}\:\mathrm{the}\:\mathrm{average}\:\mathrm{distance}\:\mathrm{between} \\ $$$$\mathrm{those}\:\mathrm{points}? \\ $$
Commented by prakash jain last updated on 05/Jul/16
Let X and Y be two random variable.  f_X (x) and f_Y (y) are probability density function  of X and Y.     In the above case we can assume uniform.  We define a new random variable  Z=(√(X^2 +Y^2 ))  Then mean value of Z will be given by:  E(Z)=∫Zf_Z (z)dz  We need to find f_Z (z) from f_X  and f_Y .  will continue to find f_Z (z)
$$\mathrm{Let}\:{X}\:\mathrm{and}\:{Y}\:\mathrm{be}\:\mathrm{two}\:\mathrm{random}\:\mathrm{variable}. \\ $$$${f}_{{X}} \left({x}\right)\:\mathrm{and}\:{f}_{{Y}} \left({y}\right)\:\mathrm{are}\:\mathrm{probability}\:\mathrm{density}\:\mathrm{function} \\ $$$$\mathrm{of}\:\mathrm{X}\:\mathrm{and}\:\mathrm{Y}.\: \\ $$$$ \\ $$$$\mathrm{In}\:\mathrm{the}\:\mathrm{above}\:\mathrm{case}\:\mathrm{we}\:\mathrm{can}\:\mathrm{assume}\:\mathrm{uniform}. \\ $$$$\mathrm{We}\:\mathrm{define}\:\mathrm{a}\:\mathrm{new}\:\mathrm{random}\:\mathrm{variable} \\ $$$${Z}=\sqrt{{X}^{\mathrm{2}} +{Y}^{\mathrm{2}} } \\ $$$$\mathrm{Then}\:\mathrm{mean}\:\mathrm{value}\:\mathrm{of}\:{Z}\:\mathrm{will}\:\mathrm{be}\:\mathrm{given}\:\mathrm{by}: \\ $$$${E}\left({Z}\right)=\int{Zf}_{{Z}} \left({z}\right){dz} \\ $$$$\mathrm{We}\:\mathrm{need}\:\mathrm{to}\:\mathrm{find}\:{f}_{{Z}} \left({z}\right)\:\mathrm{from}\:{f}_{{X}} \:\mathrm{and}\:{f}_{{Y}} . \\ $$$$\mathrm{will}\:\mathrm{continue}\:\mathrm{to}\:\mathrm{find}\:{f}_{{Z}} \left({z}\right) \\ $$
Commented by prakash jain last updated on 05/Jul/16
f_X (x)= { (1,(0≤x≤1)),(0,(elsewhere)) :}  f_Y (y)= { (1,(0≤y≤1)),(0,(elsewhere)) :}  for uniform density
$${f}_{{X}} \left({x}\right)=\begin{cases}{\mathrm{1}}&{\mathrm{0}\leqslant{x}\leqslant\mathrm{1}}\\{\mathrm{0}}&{{elsewhere}}\end{cases} \\ $$$${f}_{{Y}} \left({y}\right)=\begin{cases}{\mathrm{1}}&{\mathrm{0}\leqslant{y}\leqslant\mathrm{1}}\\{\mathrm{0}}&{{elsewhere}}\end{cases} \\ $$$$\mathrm{for}\:\mathrm{uniform}\:\mathrm{density} \\ $$
Commented by prakash jain last updated on 05/Jul/16
Since X and Y are independent variable  we can write joint probablity distribution  as  f_(XY) (x,y)=f_X (x)∙f_Y (y)  Expected value of distance  z=g(x,y)=(√(x^2 +y^2 ))  E(g(x,y))=∫_(−∞) ^∞ ∫_(−∞) ^∞ (√(x^2 +y^2 ))f_X (x)f_Y (y)dxdy  =∫_0 ^1 ∫_0 ^1 (√(x^2 +y^2 ))dxdy=(1/2)((√2)+sinh^(−1) 1)  Please check. I am not 100% sure.
$$\mathrm{Since}\:{X}\:\mathrm{and}\:{Y}\:\mathrm{are}\:\mathrm{independent}\:\mathrm{variable} \\ $$$$\mathrm{we}\:\mathrm{can}\:\mathrm{write}\:\mathrm{joint}\:\mathrm{probablity}\:\mathrm{distribution} \\ $$$$\mathrm{as} \\ $$$${f}_{{XY}} \left({x},{y}\right)={f}_{{X}} \left({x}\right)\centerdot{f}_{{Y}} \left({y}\right) \\ $$$$\mathrm{Expected}\:\mathrm{value}\:\mathrm{of}\:\mathrm{distance} \\ $$$${z}={g}\left({x},{y}\right)=\sqrt{{x}^{\mathrm{2}} +{y}^{\mathrm{2}} } \\ $$$${E}\left({g}\left({x},{y}\right)\right)=\int_{−\infty} ^{\infty} \int_{−\infty} ^{\infty} \sqrt{{x}^{\mathrm{2}} +{y}^{\mathrm{2}} }{f}_{{X}} \left({x}\right){f}_{{Y}} \left({y}\right){dxdy} \\ $$$$=\int_{\mathrm{0}} ^{\mathrm{1}} \int_{\mathrm{0}} ^{\mathrm{1}} \sqrt{{x}^{\mathrm{2}} +{y}^{\mathrm{2}} }{dxdy}=\frac{\mathrm{1}}{\mathrm{2}}\left(\sqrt{\mathrm{2}}+\mathrm{sinh}^{−\mathrm{1}} \mathrm{1}\right) \\ $$$$\mathrm{Please}\:\mathrm{check}.\:\mathrm{I}\:\mathrm{am}\:\mathrm{not}\:\mathrm{100\%}\:\mathrm{sure}. \\ $$
Commented by Temp last updated on 05/Jul/16
What if you integrate for polar coordinates  over half of the square, and double the  integral?    y=rsinθ  x=rcosθ  etc...
$$\mathrm{What}\:\mathrm{if}\:\mathrm{you}\:\mathrm{integrate}\:\mathrm{for}\:\mathrm{polar}\:\mathrm{coordinates} \\ $$$$\mathrm{over}\:\mathrm{half}\:\mathrm{of}\:\mathrm{the}\:\mathrm{square},\:\mathrm{and}\:\mathrm{double}\:\mathrm{the} \\ $$$$\mathrm{integral}? \\ $$$$ \\ $$$${y}={r}\mathrm{sin}\theta \\ $$$${x}={r}\mathrm{cos}\theta \\ $$$${etc}… \\ $$
Commented by prakash jain last updated on 07/Jul/16
If we tranform to polar the limits for r  will dependent on θ.  For half square (triangle)  r=1/cos θ  =∫_0 ^( π/4) ∫_1 ^( 1/cos θ) r^2 drdθ
$$\mathrm{If}\:\mathrm{we}\:\mathrm{tranform}\:\mathrm{to}\:\mathrm{polar}\:\mathrm{the}\:\mathrm{limits}\:\mathrm{for}\:{r} \\ $$$$\mathrm{will}\:\mathrm{dependent}\:\mathrm{on}\:\theta. \\ $$$$\mathrm{For}\:\mathrm{half}\:\mathrm{square}\:\left(\mathrm{triangle}\right) \\ $$$${r}=\mathrm{1}/\mathrm{cos}\:\theta \\ $$$$=\int_{\mathrm{0}} ^{\:\pi/\mathrm{4}} \int_{\mathrm{1}} ^{\:\mathrm{1}/\mathrm{cos}\:\theta} {r}^{\mathrm{2}} {drd}\theta \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *