Uniform

1 minute read

Published:

This post covers Introduction to probability from Statistics for Engineers and Scientists by William Navidi.

Exercises

  • Computer scientists often model the movement of a mobile computer as a random path within a rectangle. That is, two points are chosen at random within the rectangle, and the computer moves on a straight line from the first point to the second. In the study of mobile computer networks, it is important to know the mean length of a path. It is very difficult to compute this mean directly, but it is easy to estimate it with a simulation. If the endpoints of a path are denoted $(X _1, Y_1)$, and $(X_2, Y_2)$, then the length of the path

    is $ \sqrt {(X_2 − X_1)^2 + (Y_2 − Y_1)^2}$. The mean length is estimated by generating endpoints $(X^\star_1, Y^\star_1 )$, and$ (X^∗_2, Y^∗_2 )$ for many paths, computing the length of each, and taking the mean. This exercise presents a simulation experiment that is designed to estimate the mean distance between two points randomly chosen within a square of side 1

    • Generate $1000$ sets of endpoints $ (X^\star_{1i}, Y^\star_{1i})$, and $(X^\star_{2i}, Y^\star_{2i})$. Use the uniform distribution with minimum value $0$ and maximum value $1$ for each coordinate of each point. The uniform distribution generates values that are equally likely to come from any part of the interval $(0, 1)$.

Solution Answer will vary.