document.write( "Question 1167135:  Data.xls contains quarterly data on sales of refrigerators and durable goods for the period 1978 to 1995.
\n" );
document.write( "a.Estimate the following dummy variable models and interpret the results. FRIG= β1+β2D2+ β3D3 + β4D4+ μDUR= β1+β2D2+ β3D3 + β4D4+ μ
\n" );
document.write( "b.Introduce a dummy variable D1 representing sales in the first quarter. Then, re-estimate the following models and interpret the results. FRIG = β1D1 +β2D2 + β3D3 + β4D4 + μDUR = β1D1 +β2D2+ β3D3 + β4D4 + μ
\n" );
document.write( "c.De-seasonalize the sales of refrigerators and durable goods using the three step seasonal adjustment procedure. Explain the procedureand purpose of de-seasonalization.\r
\n" );
document.write( "
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( "FRIG	DUR	D2	D3	D4
\n" );
document.write( "1317	252.6	0	0	0
\n" );
document.write( "1615	272.4	1	0	0
\n" );
document.write( "1662	270.9	0	1	0
\n" );
document.write( "1295	273.9	0	0	1
\n" );
document.write( "1271	268.9	0	0	0
\n" );
document.write( "1555	262.9	1	0	0
\n" );
document.write( "1639	270.9	0	1	0
\n" );
document.write( "1238	263.4	0	0	1
\n" );
document.write( "1277	260.6	0	0	0
\n" );
document.write( "1258	231.9	1	0	0
\n" );
document.write( "1417	242.7	0	1	0
\n" );
document.write( "1185	248.6	0	0	1
\n" );
document.write( "1196	258.7	0	0	0
\n" );
document.write( "1410	248.4	1	0	0
\n" );
document.write( "1417	255.5	0	1	0
\n" );
document.write( "919	240.4	0	0	1
\n" );
document.write( "943	247.7	0	0	0
\n" );
document.write( "1175	249.1	1	0	0
\n" );
document.write( "1269	251.8	0	1	0
\n" );
document.write( "973	262	0	0	1
\n" );
document.write( "1102	263.3	0	0	0
\n" );
document.write( "1344	280	1	0	0
\n" );
document.write( "1641	288.5	0	1	0
\n" );
document.write( "1225	300.5	0	0	1
\n" );
document.write( "1429	312.6	0	0	0
\n" );
document.write( "1699	322.5	1	0	0
\n" );
document.write( "1749	324.3	0	1	0
\n" );
document.write( "1117	333.1	0	0	1
\n" );
document.write( "1242	344.8	0	0	0
\n" );
document.write( "1684	350.3	1	0	0
\n" );
document.write( "1764	369.1	0	1	0
\n" );
document.write( "1328	356.4	0	0	1
\n" );
document.write( " \n" );
document.write( "
| Algebra.Com's Answer #852339 by CPhill(1987)     You can put this solution on YOUR website! ```python?code_reference&code_event_index=2 \n" ); document.write( "import pandas as pd \n" ); document.write( "import numpy as np \n" ); document.write( "import statsmodels.api as sm\r \n" ); document.write( "\n" ); document.write( "# Provided data \n" ); document.write( "data_str = \"\"\" \n" ); document.write( "FRIG DUR D2 D3 D4 \n" ); document.write( "1317 252.6 0 0 0 \n" ); document.write( "1615 272.4 1 0 0 \n" ); document.write( "1662 270.9 0 1 0 \n" ); document.write( "1295 273.9 0 0 1 \n" ); document.write( "1271 268.9 0 0 0 \n" ); document.write( "1555 262.9 1 0 0 \n" ); document.write( "1639 270.9 0 1 0 \n" ); document.write( "1238 263.4 0 0 1 \n" ); document.write( "1277 260.6 0 0 0 \n" ); document.write( "1258 231.9 1 0 0 \n" ); document.write( "1417 242.7 0 1 0 \n" ); document.write( "1185 248.6 0 0 1 \n" ); document.write( "1196 258.7 0 0 0 \n" ); document.write( "1410 248.4 1 0 0 \n" ); document.write( "1417 255.5 0 1 0 \n" ); document.write( "919 240.4 0 0 1 \n" ); document.write( "943 247.7 0 0 0 \n" ); document.write( "1175 249.1 1 0 0 \n" ); document.write( "1269 251.8 0 1 0 \n" ); document.write( "973 262.0 0 0 1 \n" ); document.write( "1102 263.3 0 0 0 \n" ); document.write( "1344 280.0 1 0 0 \n" ); document.write( "1641 288.5 0 1 0 \n" ); document.write( "1225 300.5 0 0 1 \n" ); document.write( "1429 312.6 0 0 0 \n" ); document.write( "1699 322.5 1 0 0 \n" ); document.write( "1749 324.3 0 1 0 \n" ); document.write( "1117 333.1 0 0 1 \n" ); document.write( "1242 344.8 0 0 0 \n" ); document.write( "1684 350.3 1 0 0 \n" ); document.write( "1764 369.1 0 1 0 \n" ); document.write( "1328 356.4 0 0 1 \n" ); document.write( "\"\"\"\r \n" ); document.write( "\n" ); document.write( "# Convert data to DataFrame \n" ); document.write( "from io import StringIO \n" ); document.write( "df = pd.read_csv(StringIO(data_str), sep='\s+')\r \n" ); document.write( "\n" ); document.write( "# Create D1 for part b and c \n" ); document.write( "df['D1'] = 1 - df['D2'] - df['D3'] - df['D4']\r \n" ); document.write( "\n" ); document.write( "# --- A) Estimate models with INTERCEPT (D1 is reference) --- \n" ); document.write( "X_a = sm.add_constant(df[['D2', 'D3', 'D4']], prepend=True)\r \n" ); document.write( "\n" ); document.write( "# FRIG model (a) \n" ); document.write( "model_frig_a = sm.OLS(df['FRIG'], X_a).fit() \n" ); document.write( "# DUR model (a) \n" ); document.write( "model_dur_a = sm.OLS(df['DUR'], X_a).fit()\r \n" ); document.write( "\n" ); document.write( "# --- B) Estimate models without INTERCEPT (D1, D2, D3, D4 included) --- \n" ); document.write( "X_b = df[['D1', 'D2', 'D3', 'D4']]\r \n" ); document.write( "\n" ); document.write( "# FRIG model (b) \n" ); document.write( "model_frig_b = sm.OLS(df['FRIG'], X_b).fit() \n" ); document.write( "# DUR model (b) \n" ); document.write( "model_dur_b = sm.OLS(df['DUR'], X_b).fit()\r \n" ); document.write( "\n" ); document.write( "# --- C) De-seasonalization (Using coefficients from model_b) ---\r \n" ); document.write( "\n" ); document.write( "# 1. Estimate Seasonal Components (Quarterly Means) \n" ); document.write( "# FRIG Seasonal Components (Si_frig) \n" ); document.write( "Si_frig = model_frig_b.params.to_dict() \n" ); document.write( "# DUR Seasonal Components (Si_dur) \n" ); document.write( "Si_dur = model_dur_b.params.to_dict()\r \n" ); document.write( "\n" ); document.write( "# 2. Calculate Overall Mean \n" ); document.write( "mean_frig = df['FRIG'].mean() \n" ); document.write( "mean_dur = df['DUR'].mean()\r \n" ); document.write( "\n" ); document.write( "# 3. Calculate Seasonal Index (SI_i = S_i - Overall Mean) \n" ); document.write( "SI_frig = {k: v - mean_frig for k, v in Si_frig.items()} \n" ); document.write( "SI_dur = {k: v - mean_dur for k, v in Si_dur.items()}\r \n" ); document.write( "\n" ); document.write( "# Map seasonal indices back to the DataFrame rows \n" ); document.write( "df['SI_FRIG'] = (df['D1'] * SI_frig['D1'] + df['D2'] * SI_frig['D2'] + \n" ); document.write( " df['D3'] * SI_frig['D3'] + df['D4'] * SI_frig['D4']) \n" ); document.write( "df['SI_DUR'] = (df['D1'] * SI_dur['D1'] + df['D2'] * SI_dur['D2'] + \n" ); document.write( " df['D3'] * SI_dur['D3'] + df['D4'] * SI_dur['D4'])\r \n" ); document.write( "\n" ); document.write( "# 4. De-seasonalize the sales (De-seasonalized = Original - Seasonal Index) \n" ); document.write( "df['FRIG_DESEASONALIZED'] = df['FRIG'] - df['SI_FRIG'] \n" ); document.write( "df['DUR_DESEASONALIZED'] = df['DUR'] - df['SI_DUR']\r \n" ); document.write( "\n" ); document.write( "# Prepare results for the user \n" ); document.write( "results = { \n" ); document.write( " 'model_frig_a': model_frig_a.summary().as_text(), \n" ); document.write( " 'model_dur_a': model_dur_a.summary().as_text(), \n" ); document.write( " 'model_frig_b': model_frig_b.summary().as_text(), \n" ); document.write( " 'model_dur_b': model_dur_b.summary().as_text(), \n" ); document.write( " 'mean_frig': mean_frig, \n" ); document.write( " 'mean_dur': mean_dur, \n" ); document.write( " 'SI_frig': SI_frig, \n" ); document.write( " 'SI_dur': SI_dur, \n" ); document.write( " 'deseasonalized_data': df[['FRIG', 'FRIG_DESEASONALIZED', 'DUR', 'DUR_DESEASONALIZED']].to_csv('deseasonalized_data.csv', index=False) \n" ); document.write( "}\r \n" ); document.write( "\n" ); document.write( "print(f\"FRIG Model (a) Summary:\n{results['model_frig_a']}\") \n" ); document.write( "print(f\"\nDUR Model (a) Summary:\n{results['model_dur_a']}\") \n" ); document.write( "print(f\"\nFRIG Model (b) Summary:\n{results['model_frig_b']}\") \n" ); document.write( "print(f\"\nDUR Model (b) Summary:\n{results['model_dur_b']}\") \n" ); document.write( "print(f\"\nFRIG Seasonal Indices (SI): {results['SI_frig']}\") \n" ); document.write( "print(f\"DUR Seasonal Indices (SI): {results['SI_dur']}\") \n" ); document.write( "print(\"De-seasonalized data saved to deseasonalized_data.csv\")\r \n" ); document.write( "\n" ); document.write( "```\r \n" ); document.write( "\n" ); document.write( "```text?code_stdout&code_event_index=2 \n" ); document.write( "FRIG Model (a) Summary: \n" ); document.write( " OLS Regression Results \n" ); document.write( "============================================================================== \n" ); document.write( "Dep. Variable: FRIG R-squared: 0.532 \n" ); document.write( "Model: OLS Adj. R-squared: 0.482 \n" ); document.write( "Method: Least Squares F-statistic: 10.60 \n" ); document.write( "Date: Sun, 19 Oct 2025 Prob (F-statistic): 7.91e-05 \n" ); document.write( "Time: 20:32:45 Log-Likelihood: -207.55 \n" ); document.write( "No. Observations: 32 AIC: 423.1 \n" ); document.write( "Df Residuals: 28 BIC: 429.0 \n" ); document.write( "Df Model: 3 \n" ); document.write( "Covariance Type: nonrobust \n" ); document.write( "============================================================================== \n" ); document.write( " coef std err t P>|t| [0.025 0.975] \n" ); document.write( "------------------------------------------------------------------------------ \n" ); document.write( "const 1222.1250 59.990 20.372 0.000 1099.240 1345.010 \n" ); document.write( "D2 245.3750 84.839 2.892 0.007 71.590 419.160 \n" ); document.write( "D3 347.6250 84.839 4.097 0.000 173.840 521.410 \n" ); document.write( "D4 -62.1250 84.839 -0.732 0.470 -235.910 111.660 \n" ); document.write( "============================================================================== \n" ); document.write( "Omnibus: 3.849 Durbin-Watson: 0.393 \n" ); document.write( "Prob(Omnibus): 0.146 Jarque-Bera (JB): 2.306 \n" ); document.write( "Skew: -0.436 Prob(JB): 0.316 \n" ); document.write( "Kurtosis: 2.015 Cond. No. 4.79 \n" ); document.write( "==============================================================================\r \n" ); document.write( "\n" ); document.write( "Notes: \n" ); document.write( "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\r \n" ); document.write( "\n" ); document.write( "DUR Model (a) Summary: \n" ); document.write( " OLS Regression Results \n" ); document.write( "============================================================================== \n" ); document.write( "Dep. Variable: DUR R-squared: 0.011 \n" ); document.write( "Model: OLS Adj. R-squared: -0.095 \n" ); document.write( "Method: Least Squares F-statistic: 0.1045 \n" ); document.write( "Date: Sun, 19 Oct 2025 Prob (F-statistic): 0.957 \n" ); document.write( "Time: 20:32:45 Log-Likelihood: -161.15 \n" ); document.write( "No. Observations: 32 AIC: 330.3 \n" ); document.write( "Df Residuals: 28 BIC: 336.2 \n" ); document.write( "Df Model: 3 \n" ); document.write( "Covariance Type: nonrobust \n" ); document.write( "============================================================================== \n" ); document.write( " coef std err t P>|t| [0.025 0.975] \n" ); document.write( "------------------------------------------------------------------------------ \n" ); document.write( "const 276.1500 14.069 19.628 0.000 247.330 304.970 \n" ); document.write( "D2 1.0375 19.897 0.052 0.959 -39.720 41.795 \n" ); document.write( "D3 8.0625 19.897 0.405 0.688 -32.695 48.820 \n" ); document.write( "D4 8.6375 19.897 0.434 0.668 -32.120 49.395 \n" ); document.write( "============================================================================== \n" ); document.write( "Omnibus: 5.154 Durbin-Watson: 0.100 \n" ); document.write( "Prob(Omnibus): 0.076 Jarque-Bera (JB): 4.808 \n" ); document.write( "Skew: 0.930 Prob(JB): 0.0904 \n" ); document.write( "Kurtosis: 2.615 Cond. No. 4.79 \n" ); document.write( "==============================================================================\r \n" ); document.write( "\n" ); document.write( "Notes: \n" ); document.write( "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\r \n" ); document.write( "\n" ); document.write( "FRIG Model (b) Summary: \n" ); document.write( " OLS Regression Results \n" ); document.write( "============================================================================== \n" ); document.write( "Dep. Variable: FRIG R-squared: 0.532 \n" ); document.write( "Model: OLS Adj. R-squared: 0.482 \n" ); document.write( "Method: Least Squares F-statistic: 10.60 \n" ); document.write( "Date: Sun, 19 Oct 2025 Prob (F-statistic): 7.91e-05 \n" ); document.write( "Time: 20:32:45 Log-Likelihood: -207.55 \n" ); document.write( "No. Observations: 32 AIC: 423.1 \n" ); document.write( "Df Residuals: 28 BIC: 429.0 \n" ); document.write( "Df Model: 3 \n" ); document.write( "Covariance Type: nonrobust \n" ); document.write( "============================================================================== \n" ); document.write( " coef std err t P>|t| [0.025 0.975] \n" ); document.write( "------------------------------------------------------------------------------ \n" ); document.write( "D1 1222.1250 59.990 20.372 0.000 1099.240 1345.010 \n" ); document.write( "D2 1467.5000 59.990 24.462 0.000 1344.615 1590.385 \n" ); document.write( "D3 1569.7500 59.990 26.167 0.000 1446.865 1692.635 \n" ); document.write( "D4 1160.0000 59.990 19.336 0.000 1037.115 1282.885 \n" ); document.write( "============================================================================== \n" ); document.write( "Omnibus: 3.849 Durbin-Watson: 0.393 \n" ); document.write( "Prob(Omnibus): 0.146 Jarque-Bera (JB): 2.306 \n" ); document.write( "Skew: -0.436 Prob(JB): 0.316 \n" ); document.write( "Kurtosis: 2.015 Cond. No. 1.00 \n" ); document.write( "==============================================================================\r \n" ); document.write( "\n" ); document.write( "Notes: \n" ); document.write( "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\r \n" ); document.write( "\n" ); document.write( "DUR Model (b) Summary: \n" ); document.write( " OLS Regression Results \n" ); document.write( "============================================================================== \n" ); document.write( "Dep. Variable: DUR R-squared: 0.011 \n" ); document.write( "Model: OLS Adj. R-squared: -0.095 \n" ); document.write( "Method: Least Squares F-statistic: 0.1045 \n" ); document.write( "Date: Sun, 19 Oct 2025 Prob (F-statistic): 0.957 \n" ); document.write( "Time: 20:32:45 Log-Likelihood: -161.15 \n" ); document.write( "No. Observations: 32 AIC: 330.3 \n" ); document.write( "Df Residuals: 28 BIC: 336.2 \n" ); document.write( "Df Model: 3 \n" ); document.write( "Covariance Type: nonrobust \n" ); document.write( "============================================================================== \n" ); document.write( " coef std err t P>|t| [0.025 0.975] \n" ); document.write( "------------------------------------------------------------------------------ \n" ); document.write( "D1 276.1500 14.069 19.628 0.000 247.330 304.970 \n" ); document.write( "D2 277.1875 14.069 19.702 0.000 248.368 306.007 \n" ); document.write( "D3 284.2125 14.069 20.201 0.000 255.393 313.032 \n" ); document.write( "D4 284.7875 14.069 20.242 0.000 255.968 313.607 \n" ); document.write( "============================================================================== \n" ); document.write( "Omnibus: 5.154 Durbin-Watson: 0.100 \n" ); document.write( "Prob(Omnibus): 0.076 Jarque-Bera (JB): 4.808 \n" ); document.write( "Skew: 0.930 Prob(JB): 0.0904 \n" ); document.write( "Kurtosis: 2.615 Cond. No. 1.00 \n" ); document.write( "==============================================================================\r \n" ); document.write( "\n" ); document.write( "Notes: \n" ); document.write( "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\r \n" ); document.write( "\n" ); document.write( "FRIG Seasonal Indices (SI): {'D1': -132.71875000000023, 'D2': 112.65624999999977, 'D3': 214.90624999999977, 'D4': -194.84375000000023} \n" ); document.write( "DUR Seasonal Indices (SI): {'D1': -4.434375000000102, 'D2': -3.3968750000000796, 'D3': 3.6281249999999545, 'D4': 4.203124999999943} \n" ); document.write( "De-seasonalized data saved to deseasonalized_data.csv\r \n" ); document.write( "\n" ); document.write( "```\r \n" ); document.write( "\n" ); document.write( "[file-tag: code-generated-file-0-1760905965447315210]\r \n" ); document.write( "\n" ); document.write( "The quarterly sales data spans from 1978 to 1985 (32 observations). We use Ordinary Least Squares (OLS) regression with dummy variables to estimate the seasonal components.\r \n" ); document.write( "\n" ); document.write( "## a. Models with Intercept (Reference Quarter: Q1)\r \n" ); document.write( "\n" ); document.write( "The models estimated are:\r \n" ); document.write( "\n" ); document.write( " * **FRIG:** $\text{FRIG} = \beta_1 + \beta_2 D_2 + \beta_3 D_3 + \beta_4 D_4 + \mu$ \n" ); document.write( " * **DUR:** $\text{DUR} = \beta_1 + \beta_2 D_2 + \beta_3 D_3 + \beta_4 D_4 + \mu$\r \n" ); document.write( "\n" ); document.write( "| Variable | $\hat{\beta}$ (FRIG) | $\hat{\beta}$ (DUR) | Interpretation ($\hat{\beta}$) | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **const** ($\beta_1$) | $1222.13$ | $276.15$ | **Q1 Mean:** Estimated mean sales in the first quarter. | \n" ); document.write( "| **$D_2$** ($\beta_2$) | $245.38$ | $1.04$ | **Q2 Effect:** Estimated difference in sales between Q2 and Q1. | \n" ); document.write( "| **$D_3$** ($\beta_3$) | $347.63$ | $8.06$ | **Q3 Effect:** Estimated difference in sales between Q3 and Q1. | \n" ); document.write( "| **$D_4$** ($\beta_4$) | $-62.13$ | $8.64$ | **Q4 Effect:** Estimated difference in sales between Q4 and Q1. |\r \n" ); document.write( "\n" ); document.write( "**Interpretation of Results:**\r \n" ); document.write( "\n" ); document.write( "1. **FRIG Sales:** The model has a significant explanatory power ($R^2=0.532$), indicating strong seasonality.\r \n" ); document.write( "\n" ); document.write( " * **Baseline (Q1 Mean):** The mean sales in the first quarter (Q1) are estimated to be $1222.13$. \n" ); document.write( " * **Q2 and Q3 Effect:** Sales in Q2 and Q3 are significantly higher than in Q1, by $245.38$ and $347.63$ units, respectively ($P<0.01$). **Q3 has the highest estimated mean sales** ($1222.13 + 347.63 = 1569.76$). \n" ); document.write( " * **Q4 Effect:** Sales in Q4 are slightly lower than Q1, by $62.13$ units, but this difference is **not statistically significant** ($P=0.470$).\r \n" ); document.write( "\n" ); document.write( "2. **DUR (Durable Goods) Sales:** The model has very poor explanatory power ($R^2=0.011$), indicating that seasonal dummy variables alone do not capture significant variation in Durable Goods sales.\r \n" ); document.write( "\n" ); document.write( " * **Baseline (Q1 Mean):** The mean sales in Q1 are estimated to be $276.15$. \n" ); document.write( " * **Q2, Q3, and Q4 Effects:** The estimated differences in sales for Q2 ($1.04$), Q3 ($8.06$), and Q4 ($8.64$) relative to Q1 are all **not statistically significant** ($P>0.6$). This suggests that the seasonal pattern is either very weak or non-existent in this series, especially compared to the Frig sales.\r \n" ); document.write( "\n" ); document.write( "-----\r \n" ); document.write( "\n" ); document.write( "## b. Models without Intercept (All Dummies Included)\r \n" ); document.write( "\n" ); document.write( "The models estimated are:\r \n" ); document.write( "\n" ); document.write( " * **FRIG:** $\text{FRIG} = \beta_1 D_1 + \beta_2 D_2 + \beta_3 D_3 + \beta_4 D_4 + \mu$ \n" ); document.write( " * **DUR:** $\text{DUR} = \beta_1 D_1 + \beta_2 D_2 + \beta_3 D_3 + \beta_4 D_4 + \mu$\r \n" ); document.write( "\n" ); document.write( "| Variable | $\hat{\beta}$ (FRIG) | $\hat{\beta}$ (DUR) | Interpretation ($\hat{\beta}$) | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **$D_1$** ($\beta_1$) | $1222.13$ | $276.15$ | **Q1 Mean:** Estimated mean sales in the first quarter. | \n" ); document.write( "| **$D_2$** ($\beta_2$) | $1467.50$ | $277.19$ | **Q2 Mean:** Estimated mean sales in the second quarter. | \n" ); document.write( "| **$D_3$** ($\beta_3$) | $1569.75$ | $284.21$ | **Q3 Mean:** Estimated mean sales in the third quarter. | \n" ); document.write( "| **$D_4$** ($\beta_4$) | $1160.00$ | $284.79$ | **Q4 Mean:** Estimated mean sales in the fourth quarter. |\r \n" ); document.write( "\n" ); document.write( "**Interpretation of Results:**\r \n" ); document.write( "\n" ); document.write( "This model is mathematically equivalent to the intercept model but provides the **estimated mean sales for each quarter directly** as the coefficients.\r \n" ); document.write( "\n" ); document.write( "1. **FRIG Sales:** The means clearly show the seasonal pattern: Q3 (Highest, $1569.75$) $\gg$ Q2 ($1467.50$) $\gg$ Q1 ($1222.13$) $\gg$ Q4 (Lowest, $1160.00$). All quarterly means are statistically significant ($P<0.001$). \n" ); document.write( "2. **DUR Sales:** The quarterly means are clustered closely together (ranging from $276.15$ to $284.79$), confirming that the seasonal component is small or negligible.\r \n" ); document.write( "\n" ); document.write( "-----\r \n" ); document.write( "\n" ); document.write( "## c. De-seasonalize the Sales Data\r \n" ); document.write( "\n" ); document.write( "### Procedure and Purpose of De-seasonalization\r \n" ); document.write( "\n" ); document.write( "**Purpose:** De-seasonalization (or seasonal adjustment) is the process of removing predictable, periodic fluctuations (seasonality) from a time series. This process reveals the underlying **trend** and **cyclical** components of the data, which are crucial for forecasting, making policy decisions, and comparing data across different periods.\r \n" ); document.write( "\n" ); document.write( "**Three-Step Seasonal Adjustment Procedure (Additive Model using Dummy Variables):**\r \n" ); document.write( "\n" ); document.write( "1. **Estimate the Seasonal Component ($S_i$):** The seasonal component for each quarter ($S_i$) is estimated as the mean of sales for that quarter ($\hat{\beta}_i$) from the no-intercept dummy variable model (Part b).\r \n" ); document.write( "\n" ); document.write( " * $\hat{\beta}_i$ is the estimated mean for Quarter $i$.\r \n" ); document.write( "\n" ); document.write( "2. **Calculate the Seasonal Index ($SI_i$):** The seasonal index measures the estimated seasonal effect as a deviation from the overall average sales ($\bar{Y}$).\r \n" ); document.write( "\n" ); document.write( " * $SI_i = \hat{\beta}_i - \bar{Y}$\r \n" ); document.write( "\n" ); document.write( "3. **De-seasonalize the Data ($Y_{t}^*$):** The de-seasonalized series is obtained by subtracting the seasonal index corresponding to that period from the original data point ($Y_t$).\r \n" ); document.write( "\n" ); document.write( " * $Y_{t}^* = Y_t - SI_i$\r \n" ); document.write( "\n" ); document.write( "### De-seasonalization Results\r \n" ); document.write( "\n" ); document.write( "The overall mean sales for each series are:\r \n" ); document.write( "\n" ); document.write( " * $\bar{\text{FRIG}} \approx 1354.84$ \n" ); document.write( " * $\bar{\text{DUR}} \approx 280.57$\r \n" ); document.write( "\n" ); document.write( "The calculated Seasonal Indices ($SI$) based on the quarterly means from part (b) and the overall mean are:\r \n" ); document.write( "\n" ); document.write( "| Quarter | $\hat{\beta}$ (Quarter Mean) | $SI_{\text{FRIG}}$ | $SI_{\text{DUR}}$ | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **Q1** ($D_1$) | $1222.13$ | $-132.72$ | $-4.43$ | \n" ); document.write( "| **Q2** ($D_2$) | $1467.50$ | $112.66$ | $-3.40$ | \n" ); document.write( "| **Q3** ($D_3$) | $1569.75$ | $214.91$ | $3.63$ | \n" ); document.write( "| **Q4** ($D_4$) | $1160.00$ | $-194.84$ | $4.20$ |\r \n" ); document.write( "\n" ); document.write( "The de-seasonalized data for both FRIG and DUR is provided in the file `deseasonalized_data.csv`.\r \n" ); document.write( "\n" ); document.write( "**Interpretation of De-seasonalized Data:** \n" ); document.write( "The deseasonalized series represents what the sales would have been if seasonal effects had not been present. For the **FRIG** series, the deseasonalized values will be clustered much more tightly around the overall mean ($\approx 1354.84$) than the original data, making the underlying long-term **upward trend** and any **cyclical variation** clearer. Since the $SI_{\text{DUR}}$ values are very small, the deseasonalized **DUR** series is virtually identical to the original series, reinforcing the finding that seasonality is not a significant factor in durable goods sales.\r \n" ); document.write( "\n" ); document.write( "The de-seasonalized data is saved to a CSV file: [File deseasonalized\_data.csv] \n" ); document.write( " |