Difference between revisions of "Derivation of the Rayleigh Distribution Equation"

From ShotStat
Jump to: navigation, search
(Derivation from First Principles)
Line 1: Line 1:
 
The Rayleigh Distribution makes the following assumptions:
 
The Rayleigh Distribution makes the following assumptions:
* <math>\bar{h} \sim \mathcal{N}(\mu_h,\sigma_h^2), \bar{v} \sim \mathcal{N}(\mu_v,\sigma_v^2)</math>
+
* <math>h \sim \mathcal{N}(\mu_h,\sigma_h^2)</math>, and <math>\bar{v} \sim \mathcal{N}(\mu_v,\sigma_v^2)</math>
 
* Horizontal and vertical dispersion are independent.  
 
* Horizontal and vertical dispersion are independent.  
 
* <math>\sigma_h = \sigma_v</math> (realistically <math>\sigma_h \approx \sigma_v</math>)
 
* <math>\sigma_h = \sigma_v</math> (realistically <math>\sigma_h \approx \sigma_v</math>)
Line 82: Line 82:
 
= Derivation from First Principles =
 
= Derivation from First Principles =
  
Given the assumptions in the starting section we first translate the Cartesian coordinates to <math>(\mu_h, \mu_v)</math>, and substitute <math>\sigma</math> for both <math>\sigma_h</math> and <math>\sigma_v</math>. This simplifies the distributions of <math>h</math> and <math>v</math> to:
+
Given the assumptions in the starting section we again substitute <math>\sigma</math> for both <math>\sigma_h</math> and <math>\sigma_v</math>. This simplifies the distributions of <math>h</math> and <math>v</math> to:<br />
  
$$X, Y \sim N(0, \sigma)$$
+
&nbsp;&nbsp;&nbsp;&nbsp; <math>h \sim \mathcal{N}(\mu_h,\sigma^2)</math>, and <math>v \sim \mathcal{N}(\mu_v,\sigma^2)</math>
  
I.e., we designate the (unknown) true POI as the origin (0, 0).  Now we take some number ''n'' of "sighter" shots and calculate their center. The distance of this sample center from the true POI is
+
Now we take some number <math>n</math> of shots and calculate their center.  
  
$$R(n) =  \sqrt{\overline{x_i}^2 + \overline{y_i}^2}$$
+
&nbsp;&nbsp;&nbsp;&nbsp; <math>\bar{h} \sim \mathcal{N}(\mu_h,\sigma^2/n)</math>, and <math>\bar{v} \sim \mathcal{N}(\mu_v,\sigma^2/n)</math>
  
=== What is the distribution of Weapon Zero? ===
+
Let <math>r_n</math> be the distance of this sample center <math>(\bar{h}, \bar{v})</math> from the true distribution center <math>(\mu_h, \mu_v)</math> as:<br />
  
''Thanks to Alecos Papadopoulos for the following solution:''
+
&nbsp;&nbsp;&nbsp;&nbsp;<math>r_n = \sqrt{(\bar{h}-\mu_h)^2 + (\bar{v}-\mu_v)^2}</math>
  
Given the preceding definitions, the sample means are also mean-zero normal random variables with
+
Define random variables <math>Z_h</math> and <math>Z_v</math> as the ''Studentized'' horizontal and vertical errors by dividing by the respective standard deviations. Each of these variables with have a Chi-Squared Distribution with one degree of freedom.
$$\bar X, \bar Y \sim N(0,\sigma^2/n)$$
 
  
Define random variables
+
&nbsp;&nbsp;&nbsp;&nbsp;<math>Z_x = \left(\frac{\bar X}{\sigma/\sqrt n}\right)^2 = \frac n{\sigma^2}\bar X^2 \sim \chi^2(1)</math>
$$Z_x = \left(\frac{\bar X}{\sigma/\sqrt n}\right)^2 = \frac n{\sigma^2}\bar X^2 \sim \chi^2(1),\;\;Z_y = \left(\frac{\bar Y}{\sigma/\sqrt n}\right)^2 =\frac n{\sigma^2}\bar Y^2\sim \chi^2(1),$$
+
 
 +
&nbsp;&nbsp;&nbsp;&nbsp;<math>Z_y = \left(\frac{\bar Y}{\sigma/\sqrt n}\right)^2 =\frac n{\sigma^2}\bar Y^2\sim \chi^2(1)</math>
 +
 
 +
Define random variables <math>W</math>, which will have a Chi-Squared Distribution with two degrees of freedom like:<br />
  
Then the random variable
 
 
$$W = Z_x + Z_y =\frac n{\sigma^2}\left(\bar X^2+\bar Y^2\right)\sim \chi^2(2)$$
 
$$W = Z_x + Z_y =\frac n{\sigma^2}\left(\bar X^2+\bar Y^2\right)\sim \chi^2(2)$$
  
Line 115: Line 116:
  
 
So <math>R_n</math> follows a Rayleigh distribution with parameter <math>\alpha = \sigma / \sqrt{n}</math>.
 
So <math>R_n</math> follows a Rayleigh distribution with parameter <math>\alpha = \sigma / \sqrt{n}</math>.
 +
 +
'''Thanks to Alecos Papadopoulos for the solution.'''

Revision as of 22:30, 2 June 2015

The Rayleigh Distribution makes the following assumptions:

  • \(h \sim \mathcal{N}(\mu_h,\sigma_h^2)\), and \(\bar{v} \sim \mathcal{N}(\mu_v,\sigma_v^2)\)
  • Horizontal and vertical dispersion are independent.
  • \(\sigma_h = \sigma_v\) (realistically \(\sigma_h \approx \sigma_v\))
  • \(\rho = 0\)
  • No Fliers

for which the PDF is given by:
    \(PDF(r) = \frac{r}{\sigma^2 } \exp\left( - \frac{r^2}{2\sigma^2} \right) \)

The PDF can be derived in the following two methods.

Simplification of the Bivariate Normal Distribution

Using the assumptions above, the Rayleigh Distribution is easily simplified from the Bivariate Normal Distribution which has the equation:

    \( f(h,v) = \frac{1}{2 \pi \sigma_h \sigma_v \sqrt{1-\rho^2}} \exp\left( -\frac{1}{2(1-\rho^2)}\left[ \frac{(h-\mu_h)^2}{\sigma_h^2} + \frac{(v-\mu_v)^2}{\sigma_v^2} - \frac{2\rho(h-\mu_h)(v-\mu_v)}{\sigma_h \sigma_v} \right] \right) \)

By substituting \(\rho = 0\) the equation reduces to:

    \( f(h,v) = \frac{1}{2 \pi \sigma_h \sigma_v } \exp\left( -\frac{1}{2}\left[ \frac{(h-\mu_h)^2}{\sigma_h^2} + \frac{(v-\mu_v)^2}{\sigma_v^2} \right] \right) \)


Since \(\sigma_h\) and \(\sigma_v\) are equal, substitute \(\sigma\) for each, then collect terms in the exponential, after which the equation reduces to:

    \( f(h,v) = \frac{1}{2 \pi \sigma^2 } \exp\left( -\left[ \frac{(h-\mu_h)^2 + (v-\mu_h)^2}{2\sigma^2} \right] \right) \)

Letting \(r^2 = (h-\mu_h)^2 + (v-\mu_v)^2\) the equation becomes:

    \( f(h,v) = \frac{1}{2 \pi \sigma^2 } \exp\left( - \frac{r^2}{2\sigma^2} \right) \)

Now transforming to the polar coordinate system:

** ok, here I'm lost **

and finally:
    \( f(r) = \frac{r}{\sigma^2 } \exp\left( - \frac{r^2}{2\sigma^2} \right) \)

Derivation from First Principles

Given the assumptions in the starting section we again substitute \(\sigma\) for both \(\sigma_h\) and \(\sigma_v\). This simplifies the distributions of \(h\) and \(v\) to:

     \(h \sim \mathcal{N}(\mu_h,\sigma^2)\), and \(v \sim \mathcal{N}(\mu_v,\sigma^2)\)

Now we take some number \(n\) of shots and calculate their center.

     \(\bar{h} \sim \mathcal{N}(\mu_h,\sigma^2/n)\), and \(\bar{v} \sim \mathcal{N}(\mu_v,\sigma^2/n)\)

Let \(r_n\) be the distance of this sample center \((\bar{h}, \bar{v})\) from the true distribution center \((\mu_h, \mu_v)\) as:

    \(r_n = \sqrt{(\bar{h}-\mu_h)^2 + (\bar{v}-\mu_v)^2}\)

Define random variables \(Z_h\) and \(Z_v\) as the Studentized horizontal and vertical errors by dividing by the respective standard deviations. Each of these variables with have a Chi-Squared Distribution with one degree of freedom.

    \(Z_x = \left(\frac{\bar X}{\sigma/\sqrt n}\right)^2 = \frac n{\sigma^2}\bar X^2 \sim \chi^2(1)\)

    \(Z_y = \left(\frac{\bar Y}{\sigma/\sqrt n}\right)^2 =\frac n{\sigma^2}\bar Y^2\sim \chi^2(1)\)

Define random variables \(W\), which will have a Chi-Squared Distribution with two degrees of freedom like:

$$W = Z_x + Z_y =\frac n{\sigma^2}\left(\bar X^2+\bar Y^2\right)\sim \chi^2(2)$$

By the properties of a chi-square random variable, we have $$W_n=\frac {\sigma^2}nW \sim \text {Gamma}(k=1, \theta = 2\sigma^2/n) = \text{Exp}(2\sigma^2/n)$$ i.e. $$f_{W_n}(w_n) = \frac {n}{2\sigma^2}\cdot \exp\Big \{-\frac {n}{2\sigma^2} w_n\Big\}$$

Define \(R_n = \sqrt {W_n}\). By the change-of-variable formula we have

$$W_n = R_n^2 \Rightarrow \frac {dW_n}{dR_n} = 2R_n$$ and so

$$f_{R_n}(r_n) = 2r_n\frac {n}{2\sigma^2}\cdot \exp\Big \{-\frac {n}{2\sigma^2} r_n^2\Big\} = \frac {r_n}{\alpha^2} \exp\Big \{-\frac {r_n^2}{2\alpha^2} \Big\},\;\;\alpha \equiv \sigma/\sqrt n$$

So \(R_n\) follows a Rayleigh distribution with parameter \(\alpha = \sigma / \sqrt{n}\).

Thanks to Alecos Papadopoulos for the solution.