Radio Shack TRS-80 Model 100 Basic Manual page 100

Basic language lab
Hide thumbs Also See for TRS-80 Model 100:
Table of Contents

Advertisement

Line 50 will read the next data item from the OATA statements and store it in position
X of the Y array. Since the FOR statement repeats line 50 with X assuming values
from 1 to 24, the data items will be stored in positions 1 through 24 in the Y array.
Each time through the loop, the assignment statements in line 70 will use the value
stored -in the next location in the Y array to compute the sums SY and XY.
Note that the Y array will contain all 24 data values when the program terminates.
The next experiment will make use of this feature.
Experiment #3 Seasonal Data
Period
Number
25
21
YEAR 6
17
YEAR 5
13
YEAR 4
9
YEAR 3
5
YEAR 2
1
YEAR 1
156.6
I
100
R-1.02
148.2
*
Y. Actual Sales
Y , Computed Trend Sales
+
Seasonally Adjusted Forecast
Y
R Ratio to Trend
~
$
Sales
Y ,
R Average Ratio to Trend
200
300
400
Frequently, sales data exhibit seasonal characteristics. For example, the first quarter
might traditionally be slow compared to the rest of the year. If this is the case, it
might be useful to modify the trend line forecast by the amount that the quarter is
typically above or below the trend.
The amount above or below the trend is called the "ratio to trend" and is determined
by comparing the historical (actual) sales for the quarter to the amount which the trend
line would have predicted for that period.
Since there are six years of data, we compute the ratio for each of the first quarters
and take the average (sum the ratios and divide by six). This is called the average
ratio to trend and is the amount that sales in the first quarter differ, on the average,
from the trend line.
Figure 7-3 illustrates the ratio to trend for quarter I using the example data introduced
in Experiment 2 above.
Legend
Figure 7·3. Illustration of Ratio to Trend
94

Advertisement

Table of Contents
loading

Table of Contents