Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you do maximum likelihood calculations, the first step you need to take is the following: Assume a distribution that depends on some parameters. Since you <code>generate</code> your data (you even know your parameters), you "tell" your program to assume Gaussian distribution. However, you don't tell your program your parameters (0 and 1), but you leave them unknown a priori and compute them afterwards.</p> <p>Now, you have your sample vector (let's call it <code>x</code>, its elements are <code>x[0]</code> to <code>x[100]</code>) and you have to process it. To do so, you have to compute the following (<code>f</code> denotes the <a href="http://en.wikipedia.org/wiki/Normal_distribution#Probability_density_function" rel="noreferrer">probability density function of the Gaussian distribution</a>):</p> <pre><code>f(x[0]) * ... * f(x[100]) </code></pre> <p>As you can see in my given link, <code>f</code> employs two parameters (the greek letters µ and σ). <em>You</em> now have to calculate the values for µ and σ in a way such that <code>f(x[0]) * ... * f(x[100])</code> takes the maximum possible value.</p> <p>When you've done that, µ is your maximum likelihood value for the mean, and σ is the maximum likelihood value for standard deviation.</p> <p>Note that I don't explicitly tell you <em>how</em> to compute the values for µ and σ, since this is a quite mathematical procedure I don't have at hand (and probably I would not understand it); I just tell you the technique to get the values, which can be applied to any other distributions as well.</p> <p>Since you want to maximize the original term, you can "simply" maximize the logarithm of the original term - this saves you from dealing with all these products, and transforms the original term into a sum with some summands.</p> <p>If you really want to calculate it, you can do some simplifications that lead to the following term (hope I didn't mess up anything):</p> <pre><code> 100 ---- n * ln(1/(σ*sqrt(2pi))) - 0.5 * \ (x[i]-µ)^2 / ---------- ---- 2σ i=0 </code></pre> <p>Now, you have to find values for µ and σ such that the above beast is maximal. Doing that is a very nontrivial task called nonlinear optimization.</p> <p>One simplification you could try is the following: Fix one parameter and try to calculate the other. This saves you from dealing with two variables at the same time.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload