Skip to ContentGo to accessibility page
Principles of Data Science

Quantitative Problems

Principles of Data ScienceQuantitative Problems

Quantitative Problems

1.
A U.S. company located in New Hampshire records weekly sales of its main product for a period of 3 years. If a seasonal variation in sales exists, what would be the most likely period of the seasonal variation?
2.
Consider the time series given in the table as shown.
Month Value
1 880.7
2 727.2
3 798.5
4 504.1
5 888.4
6 725.8
7 793.4
8 499.0
9 891.7
10 722.0
11 789.1
12 501.6
Table 5.9 Time Series
a.
Identify the period of the seasonal component.
b.
Using a centered simple moving average (SMA) of window size equal to the period you found in part a, identify a trend-cycle component, t n , in the data.
c.
Detrend the data by subtracting the SMA you found in part b.
d.
Identify the seasonal component, s ^ n , using the method of averaging.
e.
Find the seasonally adjusted time series.
3.
In Collecting and Preparing Data, the following data was given, as provided in the table, showing daily new cases of COVID-19. Since new cases were not reported on Saturdays and Sundays, those weekend cases were added to the Monday cases. One way to deal with the missing data is to use a centered simple moving average to smooth the time series.

Date Weekday New Case
10/18/2021 Monday 3115
10/19/2021 Tuesday 4849
10/20/2021 Wednesday 3940
10/21/2021 Thursday 4821
10/22/2021 Friday 4357
10/23/2021 Saturday 0
10/24/2021 Sunday 0
10/25/2021 Monday 8572
10/26/2021 Tuesday 4463
10/27/2021 Wednesday 5323
10/28/2021 Thursday 5012
10/29/2021 Friday 4710
10/30/2021 Saturday 0
10/31/2021 Sunday 0
11/1/2021 Monday 10415
11/2/2021 Tuesday 5096
11/3/2021 Wednesday 6882
11/4/2021 Thursday 5400
11/5/2021 Friday 6759
11/6/2021 Saturday 0
11/7/2021 Sunday 0
11/8/2021 Monday 10069
11/9/2021 Tuesday 5297
Table 5.10 Sample of COVID-19 Data Cases within 23 Days (source: https://data.cdc.gov/Case-Surveillance)
a.
What is the most appropriate window size to use for centered SMA to address the issue of missing data in their analysis of COVID-19 data from the CDC?
b.
Perform the SMA and illustrate the results by a graph.
4.
Consider the data set USATemps1961-2023.csv.
a.
Use an ACF plot to determine the period of a potential seasonal component.
b.
Use STL to decompose the time series into trend-cycle, seasonal, and noise components.
5.
Use the recursive EMA formula with α = 0.6 to smooth the time series found in USATemps1961-2023.csv, and then use the EMA model to forecast the next value of the series.
6.
A very small time series is given in the table, along with a model.

x n x ^ n
122 117
108 135
172 152
190 169
167 186
Table 5.12 Time Series
a.
Find error measures MAE, RMSE, MAPE, and sMAPE for the model.
b.
Which of the error measures are scale-dependent? What would this imply about a similar time series and model in which all values are multiplied by 10?
Citation/Attribution
Reuse and redistribution of this content in digital or print format:
  • This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's prior written permission.
  • This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License, which means that you can reuse and modify the material only for noncommercial purposes, must attribute OpenStax, and must distribute any derivative works under the same license.
  • Any commercial printing of this textbook, including using a local or custom printer, must be approved by OpenStax, and proper citation provided.
  • OpenStax-copyrighted images, activities, assessments, and similar components of this book are subject to the same licensing – CC-BY-NC-SA. They can be used for noncommercial purposes with attribution. Commercial use requires permission.
  • Permission requests: Anyone who intends to incorporate this content (including text, images, and other components) into large language models, use it in AI offerings, use it commercially (including in print), and/or has questions about another use case is welcome to complete our reuse request form.
Attribution information
  • If you are redistributing all or part of this book in a noncommercial print format, then you must include on every physical page the following attribution:

    Access for free at https://openstax.org/books/principles-data-science/pages/1-introduction

  • If you are redistributing all or part of this book in a noncommercial digital format, then for every page that includes OpenStax content, you must license the derivative work under the same CC-BY-NC-SA license as the original, and include on every digital page view the following attribution:

    Access for free at https://openstax.org/books/principles-data-science/pages/1-introduction

Citation information

The information below includes the information needed to generate citations in most major styles (APA, MLA, etc.); you must reformat and organize the information as needed to fit the requirements of the style. Use the information below to generate a citation. We recommend using a citation tool such as this one.

© Apr 23, 2026 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo, and Rice University name, and Rice University logo trademarks, or wordmarks are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.