>
"You will need to go to the histogram progrm (we will use the Histogram progrm). Hit return to load the following packages.":
with(plots):
with(stats):
>
"Here we produce data from for our new ramdom variable, the which will allow us to compute the variance.":
CoinVar:=proc(n)
local T,i,L;
T:=[];
L:=[random[empirical[.9,.1]](n)];
for i from 1 to n
do
T:=[op(T),(
2*(L[i]-3/2)-(1-2*(0.9))
)^2];
od;
T;
end:
"Here we print look at the average":
AvIt:=proc(L)
local i,A;
A:=0;
for i from 1 to nops(L)
do
A:=A+L[i];
od;
A/nops(L);
end:
>
CoinVar(10);
>
V1:=CoinVar(20000):
AvIt(V1);
>