[mcclim-cvs] CVS update: mcclim/Doc/manual.tex

Update of /project/mcclim/cvsroot/mcclim/Doc In directory common-lisp.net:/tmp/cvs-serv16979 Modified Files: manual.tex Log Message: Fixed minor issues of mathematical accuracy in my statistics example. I was mixing sample statistics and population statistics, and while this wasn't a major problem, it is a little embarassing. As a bonus, the material is now slightly easier to understand! Date: Fri Mar 11 20:54:09 2005 Author: pscott Index: mcclim/Doc/manual.tex diff -u mcclim/Doc/manual.tex:1.24 mcclim/Doc/manual.tex:1.25 --- mcclim/Doc/manual.tex:1.24 Thu Mar 10 23:45:55 2005 +++ mcclim/Doc/manual.tex Fri Mar 11 20:54:07 2005 @@ -1650,10 +1650,10 @@ Finally, to be really fancy, we'll throw in a function to compute the standard deviation. You don't need to understand this, but the standard deviation is a measurement of how spread out or bunched -together the numbers in the sample are. It's written as $\sigma$, and +together the numbers in the sample are. It's called $s$, and it's computed like this: -$$ \sigma = \sqrt{\frac{1}{N} \sum_{i=1}^N (x_i - \overline{x})^2} $$ +$$ s = \sqrt{\frac{1}{N-1} \sum_{i=1}^N (x_i - \overline{x})^2} $$ \begin{alltt} (defgeneric standard-deviation (sample) @@ -1664,7 +1664,7 @@ (let ((mean (mean sample))) (sqrt (/ (loop for x in (data sample) sum (expt (- x mean) 2)) - (sample-size sample))))) + (1- (sample-size sample)))))) \end{alltt} This is all very nice, but when we inspect \cl{*my-sample*} all we see @@ -1748,8 +1748,8 @@ % FIXME: SCREENSHOT Finally, for our amusement and further practice, we'll try to get some -mathematical symbols. We could get $\sigma$ most easily by using a -Lisp that supports Unicode, but we'll just use the letter S instead. +mathematical symbols---in this case we'll just need $\overline{x}$. We +can get this by printing an italic $x$ and drawing a line over it: \begin{alltt} (defun xbar (stream)
participants (1)
-
pscott@common-lisp.net