>    restart:
read `C:\\Tanis-Hogg\\Maple Examples\\stat.m`:
with(plots):
read `C:\\Tanis-Hogg\\Maple Examples\\HistogramFill.txt`:

Elliot Tanis
June 12, 2006
Example 3.1-1  (Example_3_1-1.mws)

>    read `C:\\Tanis-Hogg\\Maple Examples\\Chapter_03.txt`:

>    X := Example_3_1_1;

X := [20.5, 20.7, 20.8, 21.0, 21.0, 21.4, 21.5, 22.0, 22.1, 22.5, 22.6, 22.6, 22.7, 22.7, 22.9, 22.9, 23.1, 23.3, 23.4, 23.5, 23.6, 23.6, 23.6, 23.9, 24.1, 24.3, 24.5, 24.5, 24.8, 24.8, 24.9, 24.9, 25....
X := [20.5, 20.7, 20.8, 21.0, 21.0, 21.4, 21.5, 22.0, 22.1, 22.5, 22.6, 22.6, 22.7, 22.7, 22.9, 22.9, 23.1, 23.3, 23.4, 23.5, 23.6, 23.6, 23.6, 23.9, 24.1, 24.3, 24.5, 24.5, 24.8, 24.8, 24.9, 24.9, 25....
X := [20.5, 20.7, 20.8, 21.0, 21.0, 21.4, 21.5, 22.0, 22.1, 22.5, 22.6, 22.6, 22.7, 22.7, 22.9, 22.9, 23.1, 23.3, 23.4, 23.5, 23.6, 23.6, 23.6, 23.9, 24.1, 24.3, 24.5, 24.5, 24.8, 24.8, 24.9, 24.9, 25....

>    Min(X), Max(X);

20.5, 26.7

>    ClassFreq(X,20.45 .. 26.75, 7);

[5, 4, 8, 7, 8, 5, 3]

>    xtics := [seq(20.9 + 0.9*k, k = 0 .. 6)]:
P1 := plot([[20.1,0],[20.1,0]], x = 20.1 .. 27, y = 0 .. 0.25, xtickmarks=xtics, labels=[``,``]):
P2 := HistogramFill(X,20.45 .. 26.75, 7):
txt1 := textplot([27,0, `x`], font=[TIMES,ITALIC,12],align={ABOVE,RIGHT}):
txt2 := textplot([20.1,0.25, `h(x)`], font=[TIMES,ITALIC, 12],align={ABOVE,RIGHT}):
display({P1, P2,txt1, txt2});

[Maple Plot]

Figure 3.1-1: Relative Frequency Histogram of Weights of Candy Bars

>   

Return to Menu