Combining In-Line and Multi-Line Formats

Let $\mu$ and $\sigma$ be the population mean and standard deviation. Fix the sample size $n$. Let $\bar X$ be the sample mean, $S^2$ the sample variance given by

$$ S^2 = {1 \over n-1}\sum (X_i-\bar X)^2 $$

It is elementary to show $E(\bar X)=\mu$. We now show $E(S^2)=\sigma^2$.

since $\sum (X_i-\mu)=(\sum X_i) - n\mu = n(\bar X-\mu)$.

Then

But $\sigma^2(X_i)=\sigma^2$, $\sigma^2(\bar X)=\sigma^2/n$, so

Combining LaTeX and Code Blocks

  NB. u adjusts deviation population size when computing variance
  NB. y is population
  NB. x is the sample size
  mean=: +/ % #
  s0=: %:@((%u)~@# * mean)@:*:@:- mean NB. "sample standard deviation"
  s1=: %:@mean@:*:@:- mean              NB. "population standard deviation"
  n=:x
  n1=:u n

  mu=: mean y =.x:y

  all possible samples (each has equal probability)
  possibilities=:y {~"1 (n##y)#:i.n^~#y

LaTeX/Mode Mix Example (last edited 2008-12-08 10:45:53 by )