- The Teachers` Beehive

advertisement
Moving means
3-mean smoothing
• The first and last y-value are omitted
• For all others, the y-values are replaced with
the average of itself, the value above and the
value below
y1  y2  y3
y2 
3
5-mean smoothing
• The first two and last two y-values are omitted
• For all others, the y-values are replaced by the
average of itself, the two values above and the
two values below
y4  y5  y6  y7  y8
y6 
5
example
• For the data below, find the:
a) 3-mean smoothed value for y = 4
b) 3-mean smoothed value for y = 6
c) 5-mean smoothed value for y = 4
d) 5-mean smoothed value for y = 6
t
1
2
3
4
5
6
7
y
3
11
9
6
3
1
8
a) y  y3  y4  y5  9  6  3  18  6
4
3
3
3
b)
c)
y5  y6  y7 3  1  8 12
y6 


4
3
3
3
y2  y3  y4  y5  y6 11  9  6  3  1 30
y4 


6
5
5
5
d) Cannot be calculated (this term is omitted)
2-mean smoothing
• When dealing with an even number such as 2,
the problem becomes more difficult because
the averages will not be symmetrical.
• To get around this problem, we must take a 2moving mean of the resultant averages (in
other words, do the process twice). This is
called centring.
• This will become more clear with an example
Example (2-mean smoothing)
• Apply 2-mean smoothing with centring to the
following data:
Month
Average Max Temp
Jan
30.4
Feb
29.8
Mar
25.1
Apr
21.0
May
15.8
Jun
14.8
Jul
15.2
• First we leave spaces between each row of
data. In each of these spaces we average the
y-value above and the y-value below
• This is shown on the next slide
Month
Average Max Temp
Jan
30.4
2-moving mean
30 .4  29.8
 30.1
2
Feb
29.8
29 .8  25 .1
 27 .45
2
Mar
25.1
25 .1  21 .0
 23 .05
2
Apr
21.0
21.0  15.8
 18.4
2
May
15.8
15 .8  14 .8
 15 .3
2
Jun
14.8
14 .8  15 .2
 15 .0
2
Jul
15.2
• Now we must centre our data. Each month
should have a value above it and a value
below it (except Jan and Jul, which are
omitted)
• We average these values above and below to
get the smoothed, centred values
Month
Average Max Temp
Jan
30.4
2-moving mean
omitted
30 .4  29.8
 30.1
2
Feb
29.8
29 .8  25 .1
 27 .45
2
Mar
25.1
25 .1  21 .0
 23 .05
2
Apr
21.0
21.0  15.8
 18.4
2
May
15.8
15 .8  14 .8
 15 .3
2
Jun
14.8
14 .8  15 .2
 15 .0
2
Jul
15.2
Centred
30 .1  27 .45
 28.775
2
27 .45  23 .05
 25.25
2
23.05  18 .4
 20.725
2
18 .4  15 .3
 16 .85
2
15 .3  15 .0
 15 .15
2
omitted
Example (4-mean smoothing)
• For the same data set, apply 4-mean
smoothing with centring.
• In this case, the first two and last two values
are omitted (see next slide)
Month
Average Max
Temp
4-moving mean
Jan
30.4
Omitted
Feb
29.8
Omitted
30 .4  29 .8  25 .1  21 .0
 26 .575
4
Mar
25.1
29 .8  25 .1  21 .0  15 .8
 22 .925
4
Apr
21.0
25 .1  21 .0  15 .8  14 .8
 19 .175
4
May
15.8
21.0  15.8  14.8  15.2
 16.7
4
Centred
26 .575  22 .925
 24 .75
2
22 .925  19 .175
 21 .05
2
19 .175  16 .7
 17 .9375
2
Jun
14.8
Omitted
Jul
15.2
Omitted
Plotting on the CAS
• Enter the data into a Lists&Spreadsheets page
Questions
• Ex 7B All questions
Download