{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 255 0 0 0 2 0 0 0
0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
}{CSTYLE "" -1 256 "" 0 1 97 108 104 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "
" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1
226 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0
0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 261 "" 0 1 99 116 105 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE ""
-1 262 "" 0 1 10 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1
0 0 2 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0
0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 22 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
267 "" 0 1 0 0 15 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0
64 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 22 0 0 1 0 0 0
0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 64 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 271 "" 0 1 0 0 40 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
272 "" 0 1 0 0 22 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 273 "" 0 1 0 0
28 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 274 "" 0 1 255 255 0 0 0 1 0
0 0 0 0 0 0 1 }{CSTYLE "" -1 275 "" 0 1 0 0 216 0 0 1 0 0 0 0 0 0 0 1
}{CSTYLE "" -1 276 "" 0 1 0 0 22 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
277 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 278 "" 0 1 0 0
22 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 279 "" 0 18 0 0 0 0 0 1 0 0 0
0 0 0 0 1 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 281 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
282 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 283 "" 0 14 0
0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 284 "" 1 14 0 0 0 0 0 1 0 0
0 0 0 0 0 1 }{CSTYLE "" -1 285 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 286 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
287 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 288 "" 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 289 "" 0 1 0 0 0 0 1 1 0 0 0 0
0 0 0 0 }{CSTYLE "" -1 290 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }
{CSTYLE "" -1 291 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal
" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1
1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1
-1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2
0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1
2 1 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3"
-1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1
0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Tim
es" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }
{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 2 2
2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 257 1
{CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0
0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times"
1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }
{PSTYLE "Normal" -1 259 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2
2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }}
{SECT 0 {PARA 18 "" 0 "" {TEXT 283 34 "DISCOVERING MATHEMATICS WITH MA
PLE" }{TEXT 282 0 "" }}{PARA 258 "" 0 "" {TEXT 284 77 "An Interactive \+
Exploration for Mathematicians, Engineers, and Econometricians" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT 279 33 "Chapte
r 4. Counting and Summation" }{TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT
-1 0 "" }}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 21 "Binomial coefficients"
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 394 "We sta
rt this Maple session with the binomial coefficient. We shall show by \+
example how Maple works with it and how we can use Maple to derive ide
ntities in which binomial coefficients appear. We shall also consider \+
Maple's random generator and use Maple for improving our perception of
the De Moivre-Laplace limit theorem. Roughly, this theorem asserts th
at for large values of the parameter " }{XPPEDIT 18 0 "n" "6#%\"nG" }
{TEXT -1 28 " the binomial distribution " }{XPPEDIT 18 0 "B(n,p)" "6#
-%\"BG6$%\"nG%\"pG" }{TEXT -1 47 " behaves like a normal distribution \+
with mean " }{XPPEDIT 18 0 "mu=n*p" "6#/%#muG*&%\"nG\"\"\"%\"pGF'" }
{TEXT -1 15 " and variance " }{XPPEDIT 18 0 "sigma^2=n*p*(1-p)" "6#/*
$%&sigmaG\"\"#*(%\"nG\"\"\"%\"pGF),&F)F)F*!\"\"F)" }{TEXT -1 3 ". " }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 25 "
Maple's Binomial Function" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "
" 0 "" {TEXT -1 146 "Because the binomial coefficient is the main subj
ect of this session, it is quite natural to first find out the extent \+
of Maple's knowledge of it." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "restart: help(binomial);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 78 "As you can see from the help wi
ndow, the first argument of the Maple function " }{TEXT 256 13 "binomi
al(n,k)" }{TEXT -1 53 " does not need to be a natural number. Moreover
, the " }{XPPEDIT 18 0 "Gamma" "6#%&GammaG" }{TEXT -1 123 "-function i
s also involved in the definition of binomial coefficients. This is no
t really surprising once you realize that " }{XPPEDIT 18 0 "Gamma(n+1)
=n!" "6#/-%&GammaG6#,&%\"nG\"\"\"F)F)-%*factorialG6#F(" }{TEXT -1 27 "
for non-negative integers " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1
30 ". Maple knows this too; indeed" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "convert(n!,GAMMA);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "But also for some unusual combi
nations of integers " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 5 " and \+
" }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 6 " does " }{TEXT 257 13 "bin
omial(n,k)" }{TEXT -1 89 " give unexpected answers. This is apparent f
rom the output of the following instructions:" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "binomial(5,2
),binomial(5,-2),binomial(-5,2),binomial(-5,-2);" }}{PARA 0 "> " 0 ""
{MPLTEXT 1 0 60 "binomial(2,5),binomial(2,-5),binomial(-2,5),binomial(
-2,-5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 114 "Even if we stick to
the wider definition given in section 4.2 of this chapter, so that th
e binomial coefficient '" }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 6 " \+
over " }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 29 "' also makes sense \+
for real " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 85 ", then still fou
r out of eight answers provided by Maple are surprising to a degree. \+
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 104 "In o
rder to understand what Maple is doing, it is necessary to look at th
e Maple code for the function " }{TEXT 258 13 "binomial(n,k)" }{TEXT
-1 43 ". We indicated before how this can be done." }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "?normal" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "interface(verboseproc=2); pr
int(binomial): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 179 "The comp
lete code will now appear on the screen. Here we only show the first a
nd final lines of this code. From these lines you can read off that Ma
ple interprets the coefficient " }{TEXT 285 8 "binomial" }{TEXT -1 1 "
(" }{XPPEDIT 18 0 "-2" "6#,$\"\"#!\"\"" }{TEXT -1 1 "," }{XPPEDIT 18
0 "-5" "6#,$\"\"&!\"\"" }{TEXT -1 6 ") as " }{TEXT 286 8 "binomial" }
{TEXT -1 1 "(" }{XPPEDIT 18 0 "-2" "6#,$\"\"#!\"\"" }{TEXT -1 1 "," }
{XPPEDIT 18 0 "-2-(-5)" "6#,&\"\"#!\"\",$\"\"&F%F%" }{TEXT -1 4 ") = \+
" }{TEXT 287 8 "binomial" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "-2" "6#,$\"
\"#!\"\"" }{TEXT -1 6 ",3) = " }{XPPEDIT 18 0 "-4" "6#,$\"\"%!\"\"" }
{TEXT -1 17 ". Moreover, the " }{XPPEDIT 18 0 "Gamma" "6#%&GammaG" }
{TEXT -1 24 "-function is used when " }{XPPEDIT 18 0 "n" "6#%\"nG" }
{TEXT -1 19 " is integral and " }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT
-1 42 " is a rational number with denominator 2." }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0
"" {TEXT -1 23 "Two Binomial Identities" }}{PARA 0 "" 0 "" {TEXT -1 0
"" }}{PARA 0 "" 0 "" {TEXT -1 120 "How does Maple handle the binomial \+
coefficient? What we mean is, how much does Maple know about its typic
al properties? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 55 "Would Maple know the following basic binomial identity?"
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 8 "restart:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "binomial(n+1,k) = \+
binomial(n,k) + binomial(n,k-1);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 9 "evalb(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
73 "expand(binomial(n+1,k) - (binomial(n,k) + binomial(n,k-1)));\nsimp
lify(%);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1
18 "Again we see that " }{TEXT 259 5 "evalb" }{TEXT -1 161 " gives no \+
definite answer; of course this is not surprising considering that bot
h expressions are not literally the same. However, some slight manipul
ation with " }{TEXT 260 6 "expand" }{TEXT -1 5 " and " }{TEXT 261 8 "s
implify" }{TEXT -1 62 " enables Maple to identify the resulting expres
sions as equal." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 107 "#evalb(simplify(expand(%%)));\nevalb(\nsimpli
fy(expand(binomial(n+1,k) = binomial(n,k) + binomial(n,k-1)))\n);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 57 "Let us now look at a different,
less familiar expression." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "s := (m,n) -> sum(binomial(m,k)/bin
omial(n,k),k=0..m):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "Sum(binomial
(m,k)/binomial(n,k),k=0..m) = s(m,n);" }}}{EXCHG {PARA 0 "" 0 ""
{TEXT 289 17 "[Division by zero" }{TEXT -1 4 " if " }{XPPEDIT 18 0 "n \+
< m;" "6#2%\"nG%\"mG" }{TEXT -1 7 " since " }{XPPEDIT 18 0 "k;" "6#%\"
kG" }{TEXT -1 41 " will assume positive values bigger than " }
{XPPEDIT 18 0 "n;" "6#%\"nG" }{TEXT -1 1 " " }{TEXT 290 51 "which resu
lts in zero binomial coefficient values.]" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 107 "We have discovered an unusual \+
identity. Or rather, Maple has done that. Is it correct? We tacitly as
sumed " }{XPPEDIT 18 0 "m" "6#%\"mG" }{TEXT -1 69 " to be a non-nega
tive integer, because only then does summing over " }{XPPEDIT 18 0 "k
" "6#%\"kG" }{TEXT -1 10 " = 0,..., " }{XPPEDIT 18 0 "m" "6#%\"mG" }
{TEXT -1 27 " make sense. Furthermore, " }{XPPEDIT 18 0 "n" "6#%\"nG
" }{TEXT -1 24 " cannot be smaller than " }{XPPEDIT 18 0 "m" "6#%\"mG
" }{TEXT -1 22 " (at least not when " }{XPPEDIT 18 0 "n" "6#%\"nG" }
{TEXT -1 89 " is integral) for in that case the above summation is no
t defined. One has to take care!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 4 "If " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT
-1 5 " and " }{XPPEDIT 18 0 "m" "6#%\"mG" }{TEXT -1 34 " are integral,
non-negative, and " }{XPPEDIT 18 0 "n>=m" "6#1%\"mG%\"nG" }{TEXT -1
69 ", this identity can be proved formally by mathematical induction o
n " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 22 ". This is so, because \+
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 34 "'s(m,n+1)' = m/(n+1)*`s(m-1,n)`+1;" }}}{EXCHG {PARA 259 "" 0 "
" {TEXT -1 46 "check by evaluation of RHS (adding fractions):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "subs(n=n+1,s(m,n))=m/(n+1)*s
ubs(m=m-1,s(m,n))+1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "sim
plify(rhs(%));" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 62 "They are clea
rly the same so it is consistent with being true." }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 152 "which does not take too \+
much effort to prove. Indeed, increasing the summation variable in the
second finite sum by 1, gives the first one without its " }{XPPEDIT
18 0 "k" "6#%\"kG" }{TEXT -1 16 " = 0 term. Thus" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Sum(binomial
(m,k)/binomial(n+1,k),k=0..m) -" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "
Sum(m*binomial(m-1,k)/((n+1)*binomial(n,k)),k=0..m-1) =" }}{PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 36 "simplify(s(m,n+1)-m/(n+1)*s(m-1,n));" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "subs(k=m,binomial(m,k)/binom
ial(n+1,k));" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 170 "The strong version of mathematical induction can now be \+
directly applied with the desired result. By the way, the identity in \+
question is correct for all real values of " }{XPPEDIT 18 0 "n" "6#%
\"nG" }{TEXT -1 43 " for which all parts are properly defined." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 158 "It is im
portant to realize that in this example Maple's output has been instru
mental in convincing us of the identity's correctness and in proving i
t as well." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT
-1 572 "Once again, the main point of this example is this: Maple, and
other CA systems just the same, possess large amounts of mathematical
knowledge, much of it hidden. In order to fully profit from this know
ledge, one must use the system with care and understanding, and most o
f all, one should not gratuitously accept all that is shown on the scr
een, a warning that really applies to all computer output. Nevertheles
s, the information supplied by the CA system can often lead to an impr
oved perception of the problem or at least to sensible directives for \+
further exploration." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0
"" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 19 "The Binomial S
eries" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 57 "
We now take a short excursion into the field of Analysis." }}{PARA 0 "
" 0 "" {TEXT -1 81 "The binomial series expansion is a direct generali
zation of the Binomial Theorem." }}{PARA 0 "" 0 "" {TEXT -1 50 "In the
Taylor-Maclaurin expansion of the function " }}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}{PARA
0 "> " 0 "" {MPLTEXT 1 0 20 "f := x -> sqrt(1+x);" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0
"" 0 "" {TEXT -1 26 "the binomial coefficients " }{TEXT 288 8 "binomia
l" }{TEXT -1 2 "( " }{XPPEDIT 18 0 "1/2" "6#*&\"\"\"F$\"\"#!\"\"" }
{TEXT -1 2 ", " }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 72 " ) play an \+
important role. The formal power series of this function at " }
{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 18 " = 0 is equal to " }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Su
m(binomial(1/2,k)*x^k,k=0..infinity);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 26 "Let us verify this answer." }}{PARA 0 "" 0 "" {TEXT -1
31 "The power series expansion of " }{XPPEDIT 18 0 "f" "6#%\"fG" }
{TEXT -1 1 "(" }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 6 ") at " }
{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 45 " = 0 is known to Maple and \+
with the command " }{TEXT 262 6 "taylor" }{TEXT -1 54 " we can bring t
o the screen as many terms as we wish. " }}{PARA 0 "" 0 "" {TEXT -1 0
"" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "taylorseries := taylor(
f(x),x=0,12);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 27 "The third param
eter of the " }{TEXT 263 6 "taylor" }{TEXT -1 273 " procedure - here 1
2 - should produce as many terms. But by a strange bug in Maple V, ini
tially 14 terms are produced instead of 12; when the procedure is repe
ated the expected number of terms is given. Note that the remainder te
rm is nicely written with Landau's O-symbol." }{TEXT 291 18 " FIXED BY
MAPLE 9." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1
130 "Finally we have to check that the taylor coefficients and the bin
omial coefficients agree. For that purpose we need the procedure " }
{TEXT 264 8 "coeftayl" }{TEXT -1 36 " which has to be loaded separatel
y. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 85 "### WARNING: persistent store makes one-argument read
lib obsolete\n#readlib(coeftayl):" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 22 "for j from 0 to 49 do " }}{PARA 0 "> " 0 "" {MPLTEXT
1 0 51 "if not coeftayl(f(x),x=0,j) = binomial(1/2,j) then " }}{PARA
0 "> " 0 "" {MPLTEXT 1 0 49 "ERROR(`A difference is found at index `,j
) fi od;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "`value of j` = \+
j;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 37 "We don't get any error me
ssages and " }{XPPEDIT 18 0 "j" "6#%\"jG" }{TEXT -1 66 " ran through \+
all values from 0 up to 50 since the final value of " }{XPPEDIT 18 0
"j" "6#%\"jG" }{TEXT -1 111 " is 50. This shows that the first 50 term
s of the taylor series have indeed the expected binomial coefficients.
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{SECT 0 {PARA 4 "" 0 "" {TEXT -1 35 "The De Moivre-Laplace Limit Theor
em" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 189 "In
the next example we again have to subtly steer Maple towards our ulti
mate goal, which is an improved perception of the De Moivre-Laplace li
mit theorem. This theorem is about a sequence (" }{XPPEDIT 18 0 "X[n]
" "6#&%\"XG6#%\"nG" }{TEXT -1 66 ") of stochastic variables, binomiall
y distributed with parameter " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT
-1 19 " and probability " }{XPPEDIT 18 0 "p" "6#%\"pG" }{TEXT -1 7 "
, (0 < " }{XPPEDIT 18 0 "p" "6#%\"pG" }{TEXT -1 11 " < 1). Thus" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
8 "restart:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "P(X[n]=k) = binomial
(n,k)*p^k*(1-p)^(n-k);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 ""
}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 15 "Furthe
r, let (" }{XPPEDIT 18 0 "Y[n]" "6#&%\"YG6#%\"nG" }{TEXT -1 53 ") be
the associated sequence of stochastic variables" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Y[n] := (X[n
] - n*p)/sqrt(n*p*(1-p));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0
"" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "The
n the limit theorem claims the following limit identity to be true:" }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 34 "limit(P('Y[n]' <= x),n=infinity) =" }}{PARA 0 "> " 0 ""
{MPLTEXT 1 0 43 "1/sqrt(2*Pi)*Int(exp(-t^2),t=-infinity..x);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 45 "This clearly means that for lar
ge values of " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 30 ", the binom
ial distribution B(" }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 2 ", " }
{XPPEDIT 18 0 "p" "6#%\"pG" }{TEXT -1 37 ") behaves like a normal dist
ribution " }{XPPEDIT 18 0 "N(n*p,n*p*(1-p))" "6#-%\"NG6$*&%\"nG\"\"\"%
\"pGF(*(F'F(F)F(,&F(F(F)!\"\"F(" }{TEXT -1 64 ". Can Maple help us to \+
verify the correctness of this statement?" }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{PARA 0 "" 0 "" {TEXT -1 247 "Let us first take a closer look a
t this asymptotic relation from a practical point of view. Hence the f
ollowing experiment. Tossing a coin 50 times, we count the number of t
imes 'cross' comes up. This number is counted by the stochastic variab
le " }{TEXT 266 1 "X" }{TEXT -1 27 ". Obviously, the variable " }
{XPPEDIT 18 0 "X" "6#%\"XG" }{TEXT -1 39 " is binomially distributed \+
with mean " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 1 " " }{XPPEDIT
18 0 "p" "6#%\"pG" }{TEXT -1 30 " = 50 * 0.5 = 25 and variance " }
{XPPEDIT 18 0 "n*p*(1-p)" "6#*(%\"nG\"\"\"%\"pGF%,&F%F%F&!\"\"F%" }
{TEXT -1 317 " = 50 * 0.5^2 = 12.5. We repeat this experiment 200 tim
es and arrange the results in a histogram. We then try to match up the
density function of the corresponding normal distribution with the da
ta in our histogram. Of course, our experiment will be simulated with \+
the use of Maple's random generator. In worksheet " }{TEXT 265 12 "Co
untW4b.mws" }{TEXT -1 55 " Maple's random generator is discussed in s
ome detail." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT
-1 53 "The following procedure counts the number of crosses:" }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "cr
osstoss := proc() local i;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "conve
rt([seq(rand(2)(),i=1..50)],`+`) end;" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 82 "Next we repeat this process 200 times and collect the inf
ormation in the data set " }{TEXT 280 9 "crossdata" }{TEXT -1 2 ". " }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 54 "now:=time():\ncrossdata := []:\n#for j from 1 to 1000 do" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for j from 1 to 200 do" }}{PARA 0 "
> " 0 "" {MPLTEXT 1 0 67 "crossdata := [op(crossdata),crosstoss()] od:
\ncomputime:=time()-now;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "
" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 59 "For \+
the creation of a histogram, we shall use the packages " }{TEXT 267 5
"stats" }{TEXT -1 19 " (statistics) and " }{TEXT 268 5 "plots" }
{TEXT -1 20 " and the subpackage " }{TEXT 269 11 " statplots " }{TEXT
-1 5 " of " }{TEXT 270 5 "stats" }{TEXT -1 1 "." }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "with(stats);
with(plots): with(statplots);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 6 "?stats" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "data := tr
ansform[tallyinto](crossdata," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "[s
eq(i..i+1,i=0..49)]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "hi
stogram(data);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 113 "The resu
lting graph indeed resembles to some extent that of a normal distribut
ion with mean 25 and variance 12.5." }}{PARA 0 "" 0 "" {TEXT -1 250 "I
t is not easy to judge how many data points are needed for a really co
nvincing normal distribution likeness. Increasing the number to 1000 w
ould certainly improve this appreciably. But then the time factor woul
d also increase considerably of course." }}{PARA 0 "" 0 "" {TEXT -1
133 "The histogram is now to be compared with the graph of the density
function of a normal distribution with the same mean and variance. "
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "Both gr
aphs can be jointly displayed in a figure using the command " }{TEXT
271 7 "display" }{TEXT -1 10 " from the " }{TEXT 272 5 "plots" }{TEXT
-1 98 " package. To expose the differences more clearly, the normal cu
rve gets a different color and the " }{TEXT 273 5 "style" }{TEXT -1
36 " value is changed from the default " }{TEXT 274 5 "style" }{TEXT
-1 1 " " }{TEXT 275 7 "= patch" }{TEXT -1 6 " to " }{TEXT 276 12 "st
yle = line" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "normalplot := plot(200/sqrt(Pi*25)*
exp(-(x-25)^2/2/(12.5))," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "x=0..50
,color=black):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "display(
\{histogram(data),normalplot\},style=line);" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 6 "N=5000" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "N:=5000:\nnow:=time():\ncros
sdata := []:\nfor j from 1 to N do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0
23 "#for j from 1 to 200 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "cros
sdata := [op(crossdata),crosstoss()] od:\ncomputime:=time()-now;" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "data := transform[tallyinto]
(crossdata," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "[seq(i..i+1,i=0..49)
]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "histogram(data);" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "normalplot := plot(N/sqrt(Pi*25)*ex
p(-(x-25)^2/2/(12.5))," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "x=0..50,c
olor=black):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "display(\{histogram
(data),normalplot\},style=line);" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 202 "Finally, we may also attempt to increase
our insight into the theoretical background to the theorem. Let us st
ate once more the limit identity on which the theorem is based. But fi
rst we give the mean " }{XPPEDIT 18 0 "mu" "6#%#muG" }{TEXT -1 26 " \+
and standard deviation " }{XPPEDIT 18 0 "sigma" "6#%&sigmaG" }{TEXT
-1 6 " of (" }{XPPEDIT 18 0 "X[n]" "6#&%\"XG6#%\"nG" }{TEXT -1 2 ").
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 40 "n := 'n': mu := n/2; sigma := sqrt(n/4);" }}}{EXCHG {PARA 0 ">
" 0 "" {MPLTEXT 1 0 33 "limit(P('Y[n]'<=y),n=infinity) = " }}{PARA 0
"> " 0 "" {MPLTEXT 1 0 45 "1/sqrt(2*Pi)*Int(exp(-t^2/2),t=-infinity..y
);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 5 "If (" }{XPPEDIT 18 0 "Y[n
]" "6#&%\"YG6#%\"nG" }{TEXT -1 13 ") tends to " }{XPPEDIT 18 0 "y" "
6#%\"yG" }{TEXT -1 4 " = (" }{XPPEDIT 18 0 "x-mu" "6#,&%\"xG\"\"\"%#mu
G!\"\"" }{TEXT -1 2 ")/" }{XPPEDIT 18 0 "sigma" "6#%&sigmaG" }{TEXT
-1 7 " then " }{XPPEDIT 18 0 "X[n]" "6#&%\"XG6#%\"nG" }{TEXT -1 1 "/
" }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 47 " tends to 1. Hence, in th
e limit, a change in " }{XPPEDIT 18 0 "Y[n]" "6#&%\"YG6#%\"nG" }
{TEXT -1 26 ", induced by a change in " }{XPPEDIT 18 0 "X[n]" "6#&%\"
XG6#%\"nG" }{TEXT -1 16 ", is measured by" }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "Limit('sigma'*P(Y[n]=
'y'),n=infinity) = simplify(" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "lim
it(binomial(n,mu+sigma*y)/2^n*sigma,n=infinity));" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0
"" 0 "" {TEXT -1 125 "and this is just the density function of the sta
ndard normal distribution. Apparently, Maple has no problems with this
limit!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1
100 "Maybe it will be even more evident if we take another approach. W
e give the probability function P(" }{XPPEDIT 18 0 "X[n]" "6#&%\"XG6#
%\"nG" }{TEXT -1 3 " = " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 18 ") \+
with parameter " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 12 " the nam
e " }{XPPEDIT 18 0 "f" "6#%\"fG" }{TEXT -1 6 ". Thus" }}{PARA 0 "" 0
"" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f := (x,n
) -> binomial(n,x)/2^n;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "
" }}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 77 "sum is one, so yes it is a p
robability distribution in the discrete variable " }{XPPEDIT 18 0 "x;
" "6#%\"xG" }{TEXT -1 0 "" }{TEXT -1 81 " \n(plots with corresponding \+
normal distribution, and comparison of probabilities)" }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 32 "f := (x,n) -> binomial(n,x)/2^n;" }}}{EXCHG {PARA
0 "" 0 "" {TEXT -1 22 "The allowed values of " }{XPPEDIT 18 0 "x;" "6#
%\"xG" }{TEXT -1 10 " are from " }{XPPEDIT 18 0 "0 .. n;" "6#;\"\"!%\"
nG" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Sum(f(
x,n),x=0..n)\n=sum(f(x,n),x=0..n);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT
-1 20 "This corresponds to " }{XPPEDIT 18 0 "p = q;" "6#/%\"pG%\"qG" }
{TEXT -1 61 " = 1/2, so according to the textbook discussion, the mean
is " }{XPPEDIT 18 0 "mu = n*p;" "6#/%#muG*&%\"nG\"\"\"%\"pGF'" }
{TEXT -1 3 " = " }{XPPEDIT 18 0 "n;" "6#%\"nG" }{TEXT -1 33 "/2 and th
e standard deviation is " }{XPPEDIT 18 0 "sigma^2 = n*p*q;" "6#/*$%&si
gmaG\"\"#*(%\"nG\"\"\"%\"pGF)%\"qGF)" }{TEXT -1 3 " = " }{XPPEDIT 18
0 "n;" "6#%\"nG" }{TEXT -1 16 "/4. Let's check." }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "This is the mean,
averaging the variable weighted by the probability distribution:" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Sum(x*f(x,n),x=0..n)\n=sum(x
*f(x,n),x=0..n);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 118 "The square o
f the standard deviation is the average of the square of the differenc
e between the variable and the mean:" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 69 "Sum((x-n/2)^2*f(x,n),x=0..n)\n=simplify(sum((x-n/2)^2
*f(x,n),x=0..n));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 116 "Now let's p
lot this discrete distribution together with the corresponding normal \+
distribution for various values of " }{XPPEDIT 18 0 "n;" "6#%\"nG" }
{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 155 "n:=100:\n
plot([seq([x,f(x,n)],x=0..n)],style=point):\npltb_pts:=%:\nSIGMA:=sqrt
(n/4):\nMU:=n/2:\nnormalplot := plot(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/
2/SIGMA^2)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "x=0..n,color=black):
\nn:='n':" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display(\{pltb_pts,nor
malplot\},style=line);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 ""
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 154 "n:=50:\nplot([seq([x,f(x
,n)],x=0..n)],style=point):\npltb_pts:=%:\nSIGMA:=sqrt(n/4):\nMU:=n/2:
\nnormalplot := plot(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/2/SIGMA^2)," }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "x=0..n,color=black):\nn:='n':" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display(\{pltb_pts,normalplot\},sty
le=line);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 154 "n:=10:\nplot(
[seq([x,f(x,n)],x=0..n)],style=point):\npltb_pts:=%:\nSIGMA:=sqrt(n/4)
:\nMU:=n/2:\nnormalplot := plot(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/2/SIG
MA^2)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "x=0..n,color=black):\nn:=
'n':" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display(\{pltb_pts,normalpl
ot\},style=line);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 153 "n:=5:
\nplot([seq([x,f(x,n)],x=0..n)],style=point):\npltb_pts:=%:\nSIGMA:=sq
rt(n/4):\nMU:=n/2:\nnormalplot := plot(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^
2/2/SIGMA^2)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "x=0..n,color=black
):\nn:='n':" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display(\{pltb_pts,n
ormalplot\},style=line);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 263 "Of course the probabilities found
with the normal distribution must be done with integrals over 1 unit \+
width intervals centered on the integers to compare with the correspon
ding binomial distribution. Still the comparison is not bad even for a
s low a number as 5:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 135 "n:
=5:\nSIGMA:=evalf(sqrt(n/4));\nMU:=n/2;\nevalf(add(f(x,n),x=2..3));\ni
nt(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/2/SIGMA^2),x=1.5..3.5);\nn:='n':"
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "n:=10:\nSIGMA:=evalf(sqr
t(n/4));\nMU:=n/2;\nevalf(add(f(x,n),x=4..6));\nint(1/sqrt(2*Pi)/SIGMA
*exp(-(x-MU)^2/2/SIGMA^2),x=3.5..6.5);\nn:='n':" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 132 "n:=25:\nSIGMA:=sqrt(n/4);\nMU:=n/2;\nevalf(ad
d(f(x,n),x=10..15));\nint(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/2/SIGMA^2),
x=9.5..15.5);\nn:='n':" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "
n:=100:\nSIGMA:=sqrt(n/4);\nMU:=n/2;\nevalf(add(f(x,n),x=45..55));\nin
t(1/sqrt(2*Pi)/SIGMA*exp(-(x-MU)^2/2/SIGMA^2),x=44.5..55.5);\nn:='n':
" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 158 "Of couse to do a better comp
arison we should try to match up the standard deviations with integer \+
or half-integer values as appropriate, but you get the idea." }}}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "Next we c
onsider the relative change in " }{XPPEDIT 18 0 "f" "6#%\"fG" }{TEXT
-1 1 "(" }{XPPEDIT 18 0 "mu + sigma y" "6#,&%#muG\"\"\"*&%&sigmaGF%%\"
yGF%F%" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 18 ") \+
as function of " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 39 " . In the
resulting expression we let " }{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT
-1 19 " tend to infinity." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "Limit(Diff(`f(mu+sigma*y,n)`,y)/`f(
mu+sigma*y,n)`,n=infinity) =" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "lim
it(diff(f(mu+sigma*y,n),y)/f(mu+sigma*y,n),n=infinity);" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}{PARA 0 "" 0 "" {TEXT -1 47 "Hence, in the limit, the probability fun
ction " }{XPPEDIT 18 0 "f" "6#%\"fG" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "
mu + sigma y" "6#,&%#muG\"\"\"*&%&sigmaGF%%\"yGF%F%" }{TEXT -1 2 ", "
}{XPPEDIT 18 0 "n" "6#%\"nG" }{TEXT -1 22 ") (as a function of " }
{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 60 ") can be found as the soluti
on to the differential equation " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 258 "" 0 "" {TEXT -1 4 "g'( " }{XPPEDIT 18 0 "y" "6#%\"yG" }
{TEXT -1 4 ") = " }{XPPEDIT 18 0 "-y*g(y)" "6#,$*&%\"yG\"\"\"-%\"gG6#F
%F&!\"\"" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "
" 0 "" {TEXT -1 12 "with g(0) = " }{XPPEDIT 18 0 "g[0]" "6#&%\"gG6#\"
\"!" }{TEXT -1 31 ", for an appropriate value of " }{XPPEDIT 18 0 "g[
0]" "6#&%\"gG6#\"\"!" }{TEXT -1 20 ". The Maple command " }{TEXT 277
6 "dsolve" }{TEXT -1 33 " will help us find this solution." }}{PARA 0
"" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "dsol
ve(diff(g(y),y)/g(y) = -y,g(y));" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 4 "The " }{TEXT 281 6 "dsolve" }{TEXT -1 140 " procedure has \+
been extensively rewritten in Release 5, many new result forms have be
en added, and its options are slightly different too. " }}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "Finally, the constan
t " }{TEXT 278 3 "_C1" }{TEXT -1 18 " is obtained from" }}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "Int(exp
(-1/2*y^2)*_C1,y=-infinity..infinity) = 1;" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "
" {TEXT -1 9 "and hence" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "_C1 := solve(value(%),_C1);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 7 "so that" }}{PARA 258 "" 0 ""
{TEXT -1 1 " " }{XPPEDIT 18 0 "g(y) = e^(- y^2/2)/sqrt(2*Pi)" "6#/-%\"
gG6#%\"yG*&)%\"eG,$*&F'\"\"#F-!\"\"F.\"\"\"-%%sqrtG6#*&F-F/%#PiGF/F."
}}{PARA 0 "" 0 "" {TEXT -1 31 " " }}
{PARA 0 "" 0 "" {TEXT -1 73 "is the sought after density function of t
he standard normal distribution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}
{PARA 4 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Th
is concludes the present Maple session." }{MPLTEXT 1 0 0 "" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "5 10 62 0" 0 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }