Introduction to Time Series - Christchurch Girls' High School

Download Report

Transcript Introduction to Time Series - Christchurch Girls' High School

Introduction to Time Series
What is a Time Series?
A Time Series is any set of data
that is collected over time.
Visitors to a Mall
Numbers of people
2000
1500
1000
500
0
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
• Time Series graphs are
always line graphs.
• The time scale is always
on the x axis.
• The frequency of
whatever data you are
analysing is on the y axis.
• We always graph the
data first to look for
trends and other features
that may be present
Day of the week
Features of Time Series Graphs
1. Long Term Trends
(The General Trend)
This is usually a definite
trend over the whole
series. By blurring your
eyes you can usually
see it. There are only 3
possibilities here.
Increasing, decreasing
or constant.
Many time series follow the
same pattern during the same
months of the year, days of the
week or hours of the day.
These movements are usually
the result of events repeating
themselves.
Visitors to a Mall
2000
Numbers of people
2. Seasonal Effects.
• Below is an example of one.
Can you think of other time
series data that may have
seasonal effects?
1500
1000
500
0
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
Sun
Sat
Fri
Thu
Wed
Tues
Mon
3. Cyclical Effects
These look much the same as
seasonal effects but the nature
of the cycle may be harder to
reconcile to a season.
eg - Share market rises and falls
- Consumer confidence
Day of the week
Analogue Camera Sales
$1000's sold
300
250
200
150
100
50
0
Jun
Mar
Dec
Quarter of the Year
Sept
Jun
Mar
Dec
Sept
Jun
Mar
Dec
Sept
Jun
Mar
4. Ramps or Steps
These are caused by
a sudden and
permanent shift in the
data often as a result
of external factors eg
a new mall opens
nearby or changes in
technology (digital
cameras).
Example 5: Mystery
Rossman - NZAMT
Statistics of Illumination
6
Example 5: Mystery
Rossman - NZAMT
Statistics of Illumination
7
Example 5: Mystery
Rossman - NZAMT
Statistics of Illumination
8
Example 5: Mystery
Rossman - NZAMT
Statistics of Illumination
9
Example 5: Mystery
• Life expectancy in Botswana
Rossman - NZAMT
Statistics of Illumination
10
Example 5: Mystery
• What does this graph reveal about how life
expectancy in Botswana has changed
over the past 50 years?
• Suggest explanations for the changes
Rossman - NZAMT
Statistics of Illumination
11
Rossman - NZAMT
Statistics of Illumination
12
• 1980- HIV began to affect Africa
• AIDS has caused the life expectancy in
Botswana to fall from 64 in 1990 to 35 in
2004
Rossman - NZAMT
Statistics of Illumination
13
Example 5: Mystery
• Why the increase around 2005+?
Rossman - NZAMT
Statistics of Illumination
14
5. Random Errors
There are 2 types of random errors. Noise is when we get
small fluctuations away from the general trend and
Spikes (or outliers) is when we get large variations from
the trend.
Where is the spike below?
What is the difference between a Spike and a permanent
shift?
Day of the week
W
ed
on
M
at
S
Th
u
Tu
es
un
S
Fr
i
W
ed
on
1600
1400
1200
1000
800
600
400
200
0
M
Numbers of people
Mall visitors
When analysing Time Series Data always
graph the raw data first so that features
can be identified and appropriate analysis
undertaken.
James Thurber once wrote:
Get it right or leave it alone
The conclusion you jump to may be your own.