Module 15 · Project 7 · Due the date on Canvas · Synthesis Portfolio & Evidence Workshop · adaptive competency DV23
Concept review — Time series, hypothesis testing and description
Time Series
- Trend
- The long-term upward or downward movement in a time series, separate from short-term fluctuations. Establishing a trend requires a sufficiently long series and attention to seasonality; a short run of increasing values does not establish one.
- Seasonality
- Repeating patterns at a stated period, such as daily, weekly or yearly. Their presence must be supported by the observations and subject-matter context; annual seasonality is not established merely by the use of a 12-point smoother. A seasonal adjustment procedure corresponds to an implicit time-series model, whose adequacy can be checked against the data (Cleveland & Tiao, 1976).
- Moving Average
- A trailing smoother that averages the last \(k\) observations: \( m_t=k^{-1}\sum_{i=0}^{k-1}x_{t-i} \). It reduces noise but lags behind true changes and can flatten peaks. A moving average is a descriptive smoother; by itself it is not a fully specified forecasting model.
- Autocorrelation
- Correlation between a series and a lagged copy of itself. Statistically detectable autocorrelation is evidence against independence. Positive autocorrelation often makes independence-based intervals too narrow, while other dependence structures can affect uncertainty differently. Autocorrelation should therefore be examined, for example with a portmanteau test (Ljung & Box, 1978), before inference is applied to time-series data.
Hypothesis Testing
- Null and Alternative Hypotheses
- The null \(H_0\) represents the reference claim; the alternative \(H_1\) specifies the direction(s) or values against which evidence is evaluated. A test does not prove the alternative; it rejects or fails to reject the null at a chosen significance level.
- P-Value
- The probability, assuming the null hypothesis and test model, of a test statistic at least as extreme as the observed statistic in the direction(s) specified by the alternative. A small p-value means the data would be surprising under the null. It is not the probability that the null is true, and it does not directly measure effect magnitude or practical importance (Greenland et al., 2016).
- Type I and Type II Errors
- A Type I error rejects a true null; a Type II error fails to reject the null under a specified alternative. For a fixed model, alternative, sample size and nested rejection rule, lowering the significance threshold generally lowers the Type I rate and raises the Type II rate. This is not a universal trade-off between all possible tests. The nominal Type I rate depends on the test assumptions being valid.
- Statistical Power
- For a specified alternative and testing procedure, power is the probability of rejecting \(H_0\), namely \(1-P(\text{Type II error})\). It depends on sample size, effect size, variability, significance level and design (Cohen, 1992). Failure to reject does not establish equivalence or prove the null; those claims require an appropriate procedure and sufficiently precise evidence.
- Effect Size
- Quantifies the magnitude of a difference or relationship in original or standardized units. Its population value does not depend on the sample size, but its estimate and the uncertainty of that estimate depend on the data and design. It should be interpreted with that uncertainty and a context-specific threshold for practical importance.
Descriptive Statistics and Visualization
- Median and IQR
- The median is a 50th-percentile summary, and the IQR is the third quartile minus the first. They are resistant to some extreme observations and often useful for skewed distributions. Mean and SD can still answer a justified question for skewed data; choose the summary according to the estimand and context.
- Five-Number Summary
- Minimum, first quartile, median, third quartile and maximum. It describes selected aspects of a distribution rather than its complete shape. Quartile conventions can differ. Tukey boxplot whiskers need not equal the minimum and maximum because observations beyond the fences are displayed separately.
- Histogram
- Divides data into bins and counts observations per bin. The bin width changes the apparent shape: bins that are too wide conceal detail, and bins that are too narrow add noise. Histograms show shape (symmetric, skewed, bimodal) but are sensitive to binning choices.
- Kernel Density Estimate
- A smooth alternative to the histogram that estimates the PDF by averaging small bumps (kernels), each of area 1 and centered at a data point: \( \hat{f}(x) = \frac{1}{nh}\sum_{i=1}^{n} K\!\left(\frac{x - x_i}{h}\right) \), where \( h \) is the bandwidth. The bandwidth controls its smoothness, as the bin width does for a histogram, and must be chosen with care (Sheather & Jones, 1991). Module 3 uses kernel density estimates.
- Boxplot and Violin Plot
- A Tukey boxplot shows the quartiles and median; its whiskers extend to the most extreme observations within the \( 1.5\,\mathrm{IQR} \) fences, with farther observations plotted separately (McGill et al., 1978). A violin plot shows a mirrored density estimate and may overlay summary statistics, depending on its design (Hintze & Nelson, 1998). Both compare distributions across groups without assuming a specific model.