The COVID-19 pandemic has been a difficult time across the United States and around the world. Thankfully, over months of dealing with this pandemic, learning to wear masks and to social distance, in the US we have decreased the number of cases and infection rates. This project analyzes publicly available data that contains the number of COVID-19 cases in the United States and North Carolina for a number of dates in 2020 and 2021. In this project, we have applied several curve fitting techniques to this data. Based on observations and statistical metrics we will decide whether a linear or exponential model would better represent this data. First, we have plotted the data set on a a normal and logarithmic scale, which will gives us a better understanding of which model is best. Then, we have applied a numerical approach to fit linear and exponential curves to subsets of the data from March 2020 and March 2021 in both locations. As an alternative approach, we have also used linear interpolation to model the data based on the extreme points. Lastly, through out the project, we analyze the growth rates of COVID-19 in these two locations overall and throughout the Summer. We will use this information to conclude our findings.
Figure 1: Artist Rendering of COVID-19 Virus [1]
The first step in producing a regression model is to plot the data to determine what type of regression would be most appropriate. To do this, we will first plot the raw data and then plot it on a logarithmic y-scale. The following plots show what we have found, with figure 2 being normal and figure 3 being logarithmic.
Figure 2: Number of cases over time for the US and North Carolina
The normal plot shows that the relationship between case count and date has a somewhat consistent positive slope, which suggests that a linear regression might be appropriate.
Figure 3: Number of cases over time for the US and North Carolina on a logarithmic scale
The fact that certain portions of the logarithmic plot appear linear suggests that an exponential regression may also be appropriate. The next step is to fit the linear and exponential regression formulas to our data. A linear regression is written in the following form:
Equations for a0 and a1 can be derived using techniques from optimization, the goal being to minimize the error between the model and the actual data at any given point. This is done by first writing the following equation from what is called residual error (ei):
This residual error is then squared. This ensures it is positive in order to not confuse the minimization process, but it results in outliers having a large effect on the final regression. The squared residuals are then summed, resulting in the following equation:
Where Sr is known as the sum of squared residuals, Sr is a measure of the error between our model and the actual data. Next we apply concepts from optimization, specifically minimization. We begin by taking the partial derivative of Sr with respect to both a0 and a1 and setting those partial derivatives equal to zero to find the minimum value of Sr.
Since we have our full set of x’s and y’s, in our case the dates and number of cases reported on those dates, we now have a system of two equations with two unknowns a0 and a1, which are also the two coefficients we require to write our linear regression. We elected to use what are called the normal equations, which are an algebraic transformation of the above system into equations for a0 and a1. Those equations are as follows:
With these equations in hand, we can write our linear regressions for US cases in March 2020, US cases in March 2021, NC cases in March 2020, and NC cases in March 2021. Because of the number of sums involved, hand calculations would be unrealistic. However, we have included my entire MATLAB script for this lab at the bottom of this page which includes functions for calculating a0 and a1. It is important to note that since a0 depends on a1, the latter must be calculated first. Plots of the linear regression superimposed over the raw case data are included in the results section.
Now we will move to fitting exponential regressions for each time and period and area. An exponential regression is of the following form:
We can employ a strategy called linearization to write equations for α1 and β1 in terms of a0 and a1 and use the equations we have just derived. Recall how at the beginning of this section we noted that because portions of the data appeared linear on a logarithmic scale, a exponential regression may be a good fit for our data. We will be using a similar concept to linearize our equation.
Our overall goal is to rewrite our exponential regression formula in a linear form. To begin we will take the natural log of both sides.
Now using rules of logarithms, we can split the right-hand side of the equation.
After simplifying we are left with the following:
Note that not only is this form linear, it is also very similar to our equation for our linear regression.
This being the case, we can see how to write α1 and β1 in terms of a0 and a1.
Now that we can calculate α1 and β1, we can fit our exponential regressions! Again, hand calculations would be unrealistic, but code for how we calculated α1 and β1 and fitted the exponential regressions can be found at the bottom of this page. Plots of the fitted exponential regressions super-imposed over the raw case data for March 2020 and March 2021 for the US, and March 2020 and March 2021 for NC are included in the results section.
Another important concept when modelling pandemic spread is a quantity called the growth factor. Specifically, the growth factor is the ratio between the number of cases reported on a given day and the number of cases reported on the previous day. I calculated growth factors for each of the time periods of interest with the following equation, where N is the number of cases:
For example, on the eleventh day of March 2020 the growth factor for cases in NC was:
Plots of the growth factor over time and a table summarizes the mean and standard deviations of the growth factors are included in the results section.
Select Case Data for March 2020 and March 2021 for both the US and NC
Declare a x-vector representing the 31 days in March
Linear Curve Fitting
Calculate a1 and a0 using the above equations for each period of interest
Calculate the model y values using the x-vector for each period of interest
model y's = a0 + a1 * x-vector
Exponential Curve Fitting
Calculate α1 and β1 using the above equations for each period of interest
Calculate the model y values using the x-vector for each period of interest
model y's = α1 *exp(β1*x-vector)
Calculate Growth Rate
While loop: while i less than the length of the TotalCases vector
growth rate(i) = TotalCases(i+1)/TotalCases(i)
i = i+1
Calculate sum of square residuals
sum((data-model)^2)
Calculate r^2 value
(st(y) - sum of square residuals) / st(y)
Calculate Standard Error
sqrt(sum of square residuals / 29)
For our alternative approach to modelling the COVID-19 cases in the US and NC for March 2020 and March 2021, we utilized a linear interpolation method and interpolated between the extreme points on the x-axis. We required a refresher on linear interpolation, which was sourced from byjus.com [2].
To compute the interpolation, We first extracted the x and y values of the first (x0,y0) and last (x1,y1) data points. Then we constructed a vector which contained the values of x for which we would interpolate values of y. we computed the interpolated values of y with the following equation:
For example, the first interpolated point for NC in March 2021 along the vector x = [1.5:0.5:30.5] would be:
Linear interpolations were produced for each period of interest, full MATLAB code is provided at the bottom of the page. Plots of the linear interpolations super-imposed over the raw cases data are included in the results section.
Select and store the x and y values for the first and last data points for the period of interest
Declare a vector containing the x values for which we will interpolate
Use the above function to calculate the y values for each x value
Plot the interpolated y values verses the x-vector
The following 4 figures represent the data fit with a linear model.
Figure 4: COVID-19 Cases in March 2020 in North Carolina with a linear fit
Figure 5: COVID-19 Cases in March 2020 in the US with a linear fit
Figure 6: COVID-19 Cases in March 2021 in North Carolina with a linear fit
The four graphs below show the data fit with an exponential model.
Figure 7: COVID-19 Cases in March 2021 in the US with a linear fit
Figure 8: COVID-19 Cases in March 2021 in the US with a linear fit
Figure 9: COVID-19 Cases in March 2020 in the US with a exponential fit
Figure 10: COVID-19 Cases in March 2021 in North Carolina with a exponential fit
Figure 11: COVID-19 Cases in March 2021 in the US with a exponential fit
The following couple graphs represent the growth factor of COVID-19 cases in North Carolina and the United States.
Figure 12: Growth Factor of COVID-19 Cases in North Carolina
Figure 13: Growth Factor of COVID-19 Cases in the US
Next, table 3 shows the COVID-19 growth rate summar statistics.
Finally, these plots represent the analytical method results for using linear interpolation with the raw case data.
Figure 14: Plots of Total US COVID Cases from March 2020 and March 2021 with Fitted Linear Interpolation
Figure 15: Plots of Total NC COVID Cases from March 2020 and March 2021 with Fitted Linear Interpolation
Error analysis is important for determining how well regressions model the data they are intending to model. However, error analysis for regressions and statistical models in general is different than the error analysis we have completed for other numerical methods in this class.
Our discussion of error begins by calculating the sum of square residuals, recall that Sr was very important in allowing us to use optimization methods to write the normal equations for a0 and a1. Recall that:
Again, the involved summations make hand calculations unrealistic, but note that the equation is simply the sum of the squares of the differences between the actual value y and the model value f(x) for each value of x. Table 2 summarizes the Sr calculated for each regression.
Sr is useful for calculating several other error metrics, including the one we will focus on now, standard error. Standard error is the average amount that an actual data point deviates from the model at the corresponding x value. Standard error is calculated with the following equation:
For example, for the linear regression of the US data from March 2020, the standard error would be equal to:
Table 3 below summarizes the calculated standard error for each regression. I felt that these values were unusually high, and I believe there is either an error in my calculations or this metric is particularly susceptible to outliers. Full MATLAB code that shows the calculations of standard error for each regression is included at the end of this webpage.
We now come to what is likely the most familiar metric of statistical error analysis, the r^2 value. R^2 is a normalized comparison of the dependent variable’s deviation from the mean and the dependent variable’s deviation from the model, basically giving a sense of how much the model improves our ability to predict values in a dataset. R^2 values are over a range from 0 to 1, with 1 being the “best.” R^2 is calculated with Sr and a new variable St:
Table 4 summarizes the r^2 values for each regression.
It is clear from our results that across the board, the data from March 2021 is much more suited to being modeled using regressions than the data from March 2020. Looking solely at the March 2021 data, for which all regressions had and r^2 value of 0.99+, you really couldn’t go wrong with either an exponential or linear regression. However, when you consider the March 2020 data, in which no regressions r2 values were above 0.8, it seems that linear regressions just surpass exponential ones for the title of preferred method. This is an interesting discovery, considering what many of us assume about the spread of viruses, it should come as a surprise that the linear models outperformed the exponential ones. I have a few theories as to why this is the case. The first being that the case increases in March 2020 were increasing exponentially, as we can glean from the plots of the entire data set, but the case numbers were still so low that when you look at just the month of March the case increase is appearing to be much more linear. My second theory has to do with the March 2021 data, it is my assumption (and in all honesty my hope) that in March 2021 we are past the inflection point on the logistical curve as explained in the growth factors video. Therefore, the cases are no longer increasing exponentially. Another possibility that must be considered when considering the March 2020 data is the impact of what were then newly instituted COVID-19 spread discouragement policies. Perhaps it was the impact of those policies that prevented the virus from accelerating in a truly exponential manner. In North Carolina, a state of emergency was declared in relation to the COVID-19 pandemic on March 10, 2020. Public schools were closed on March 14, 2020; and restaurants and bars were closed on March 17, 2020. [3] The escalation of these policies over the month of March 2020 likely contributed to the avoidance of exponential spread.
% PSL4 Final
%Curve Fitting of COIVD-19 Case Data
%%Clear All Close All
clear variables;
close all;
clc
%% Load Data
load('COVIDcases.mat');
%% Plotting
figure(1); % Normal Scale
subplot(2,1,1);
plot(Dates,TotalNCcases,'*');
title("Total NC COVID Cases");
ylabel("Number of Cases");
box on;
grid on;
subplot(2,1,2);
plot(Dates,TotalUScases,'*');
title("Total US COVID Cases");
ylabel("Number of Cases");
box on;
grid on;
figure(2); % Log Scale
subplot(2,1,1);
semilogy(Dates,TotalNCcases,'*');
title("Total NC COVID Cases Log Scale");
ylabel("Number of Cases");
box on;
grid on;
subplot(2,1,2);
semilogy(Dates,TotalUScases,'*');
title("Total US COVID Cases Log Scale");
ylabel("Number of Cases");
box on;
grid on;
%% Selecting Data For March 2020
March2020 = (1:31)';
USCasesMarch2020 = TotalUScases(1:31);
NCCasesMarch2020 = TotalNCcases(1:31);
%% Selecting Data for March 2021
March2021 = (1:31)';
USCasesMarch2021 = TotalUScases(366:396);
NCCasesMarch2021 = TotalNCcases(366:396);
%% Linear Curve Fitting
%March 2020 US
a1M20US = a1(March2020,USCasesMarch2020);
a0M20US = a0(March2020,USCasesMarch2020,a1M20US);
yMarch2020US = a0M20US + a1M20US .* March2020;
%March 2020 NC
a1M20NC = a1(March2020,NCCasesMarch2020);
a0M20NC = a0(March2020,NCCasesMarch2020,a1M20NC);
yMarch2020NC = a0M20NC + a1M20NC .* March2020;
%March 2021 US
a1M21US = a1(March2021,USCasesMarch2021);
a0M21US = a0(March2021,USCasesMarch2021,a1M21US);
yMarch2021US = a0M21US + a1M21US .* March2021;
%March 2021 NC
a1M21NC = a1(March2021,NCCasesMarch2021);
a0M21NC = a0(March2021,NCCasesMarch2021,a1M21NC);
yMarch2021NC = a0M21NC + a1M21NC .* March2021;
%% Exponential Curve Fitting
expUSCasesMarch2020 = log(USCasesMarch2020);
expNCCasesMarch2020 = log(NCCasesMarch2020);
expUSCasesMarch2021 = log(USCasesMarch2021);
expNCCasesMarch2021 = log(NCCasesMarch2021);
%March 2020 US
beta20US = a1(March2020, expUSCasesMarch2020);
alpha20US = exp(a0(March2020, expUSCasesMarch2020, beta20US));
expMarch20US = alpha20US .* exp(beta20US .* March2020);
%March 2020 NC
beta20NC = a1(March2020, expNCCasesMarch2020);
alpha20NC = exp(a0(March2020, expNCCasesMarch2020, beta20NC));
expMarch20NC = alpha20NC .* exp(beta20NC .* March2020);
%March 2021 US
beta21US = a1(March2021, expUSCasesMarch2021);
alpha21US = exp(a0(March2021, expUSCasesMarch2021, beta21US));
expMarch21US = alpha21US .* exp(beta21US .* March2021);
%March 2021 NC
beta21NC = a1(March2021, expNCCasesMarch2021);
alpha21NC = exp(a0(March2021, expNCCasesMarch2021, beta21NC));
expMarch21NC = alpha21NC .* exp(beta21NC .* March2021);
%% Plotting Fitted Curves
figure(3)
%March 2020 US Linear
subplot(2,1,1);
hold on
plot(March2020,yMarch2020US);
plot(March2020, USCasesMarch2020,'*');
title("US Covid Cases March 2020, Linear Regression");
legend('Fitted Linear Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
%March 2020 US Exponential
subplot(2,1,2);
hold on
plot(March2020,expMarch20US);
plot(March2020, USCasesMarch2020,'*');
title("US Covid Cases March 2020, Exponential Regression");
legend('Fitted Exponential Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
figure(4)
%March 2021 US Linear
subplot(2,1,1);
hold on
plot(March2021,yMarch2021US);
plot(March2021, USCasesMarch2021,'*');
title("US Covid Cases March 2021, Linear Regression");
legend('Fitted Linear Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
%March 2021 US Exponential
subplot(2,1,2);
hold on
plot(March2021,expMarch21US);
plot(March2021, USCasesMarch2021,'*');
title("US Covid Cases March 2021, Exponential Regression");
legend('Fitted Exponential Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
figure(5)
%March 2020 NC Linear
subplot(2,1,1);
hold on
plot(March2020,yMarch2020NC);
plot(March2020, NCCasesMarch2020,'*');
title("NC Covid Cases March 2020, Linear Regression");
legend('Fitted Linear Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
%March 2020 NC Exponential
subplot(2,1,2);
hold on
plot(March2020,expMarch20NC);
plot(March2020, NCCasesMarch2020,'*');
title("NC Covid Cases March 2020, Exponential Regression");
legend('Fitted Exponential Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
figure(6)
%March 2021 NC Linear
subplot(2,1,1);
hold on
plot(March2021,yMarch2021NC);
plot(March2021, NCCasesMarch2021,'*');
title("NC Covid Cases March 2021, Linear Regression");
legend('Fitted Linear Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
%March 2021 NC Exponential
subplot(2,1,2);
hold on
plot(March2021,expMarch21NC);
plot(March2021, NCCasesMarch2021,'*');
title("NC Covid Cases March 2021, Exponential Regression");
legend('Fitted Exponential Regression','Raw Case Data','Location','northwest');
legend('boxoff');
ylabel("Number of Cases");
xlabel("Date");
xlim([0 31]);
hold off
%% Grow Factor
% NC Growth Factors
i = 1;
while i < length(TotalNCcases) - 1
if TotalNCcases(i) ~= 0
gfNC(i) = TotalNCcases(i + 1) / TotalNCcases(i);
else
gfNC(i) = 0;
end
i = i + 1;
end
gfNCMean = mean(gfNC);
gfNCStdev = std(gfNC);
% US Growth Factors
j = 1;
while j < length(TotalUScases) - 1
if TotalUScases(j) ~= 0
gfUS(j) = TotalUScases(j + 1) / TotalUScases(j);
end
j = j + 1;
end
gfUSMean = mean(gfUS);
gfUSStdev = std(gfUS);
%% Plot Growth Factors
figure(7);
subplot(2,1,2);
plot(Dates(1:405),gfNC);
title("NC COVID Case Growth Factor over Time");
ylabel("Growth Factor");
grid on;
box on;
ylim([1 4]);
subplot(2,1,1);
plot(Dates(1:405),gfUS);
title("US COVID Case Growth Factor over Time");
ylabel("Growth Factor");
grid on;
box on;
ylim([1 2]);
figure(8);
subplot(2,1,1);
histogram(gfUS,20);
title("Histogram of US COVID Case Growth Factors");
xlabel("Growth Factor");
ylabel("Number of Occurences");
subplot(2,1,2);
histogram(gfNC,20);
title("Histogram of NC COVID Case Growth Factors");
xlabel("Growth Factor");
ylabel("Number of Occurences");
%% Alternative Solution
% Linear interpolation betweem extreme points
% Required Data
March2020;
March2021;
USCasesMarch2020;
USCasesMarch2021;
NCCasesMarch2020;
USCasesMarch2021;
% US March 2020
x0 = March2020(1);
y0 = USCasesMarch2020(1);
x1 = March2020(length(March2020));
y1 = USCasesMarch2020(length(March2020));
xLinIntUSMAR2020 = [1.5:0.5:30.5];
LinIntUSMAR2020 = y0 + (((xLinIntUSMAR2020 - x0) * (y1 - y0)) / (x1 - x0));
% US March 2021
x0 = March2021(1);
y0 = USCasesMarch2021(1);
x1 = March2021(length(March2021));
y1 = USCasesMarch2021(length(March2021));
xLinIntUSMAR2021 = [1.5:0.5:30.5];
LinIntUSMAR2021 = y0 + (((xLinIntUSMAR2021 - x0) * (y1 - y0)) / (x1 - x0));
% NC March 2020
x0 = March2020(1);
y0 = NCCasesMarch2020(1);
x1 = March2020(length(March2020));
y1 = NCCasesMarch2020(length(March2020));
xLinIntNCMAR2020 = [1.5:0.5:30.5];
LinIntNCMAR2020 = y0 + (((xLinIntNCMAR2020 - x0) * (y1 - y0)) / (x1 - x0));
% NC March 2021
x0 = March2021(1);
y0 = NCCasesMarch2021(1);
x1 = March2021(length(March2021));
y1 = NCCasesMarch2021(length(March2021));
xLinIntNCMAR2021 = [1.5:0.5:30.5];
LinIntNCMAR2021 = y0 + (((xLinIntNCMAR2021 - x0) * (y1 - y0)) / (x1 - x0));
% Plot Linear Interpolation
figure(9);
% US March 2020
subplot(2,1,1);
hold on
plot([1:59],LinIntUSMAR2020);
plot(March2020,USCasesMarch2020,'*');
title("US COVID Cases March 2020, Linear Interpolation");
ylabel("Number of COVID cases");
legend("Linear Interpolation","Raw Case Data",'Location','northwest');
grid on;
box on;
hold off
%US March 2021
subplot(2,1,2);
hold on
plot([1:59], LinIntUSMAR2021);
plot(March2021, USCasesMarch2021,'*');
title("US COVID Cases March 2021, Linear Interpolation");
ylabel("Number of COVID cases");
legend("Linear Interpolation","Raw Case Data",'Location','northwest');
grid on;
box on;
hold off
figure(10);
%NC March 2020
subplot(2,1,1);
hold on
plot([1:59],LinIntNCMAR2020);
plot(March2020,NCCasesMarch2020,'*');
title("NC COVID Cases March 2020, Linear Interpolation");
ylabel("Number of COVID cases");
legend("Linear Interpolation","Raw Case Data",'Location','northwest');
grid on;
box on;
hold off
%NC March 2021
subplot(2,1,2);
hold on
plot([1:59], LinIntNCMAR2021);
plot(March2021, NCCasesMarch2021,'*');
title("NC COVID Cases March 2021, Linear Interpolation");
ylabel("Number of COVID cases");
legend("Linear Interpolation","Raw Case Data",'Location','northwest');
grid on;
box on;
hold off
%% Error Analysis
% Sum of Square Residuals
%US March 2020 Linear
SRUSMAR2020Lin = sr(USCasesMarch2020,yMarch2020US);
%US March 2020 Exponential
SRUSMAR2020Exp = sr(USCasesMarch2020,expMarch20US);
%US March 2021 Linear
SRUSMAR2021Lin = sr(USCasesMarch2021,yMarch2021US);
%US March 2021 Exponential
SRUSMAR2021Exp = sr(USCasesMarch2021,expMarch21US);
%NC March 2020 Linear
SRNCMAR2020Lin = sr(NCCasesMarch2020,yMarch2020NC);
%NC March 2020 Exponential
SRNCMAR2020Exp = sr(NCCasesMarch2020,expMarch20NC);
%NC Marh 2021 Linear
SRNCMAR2021Lin = sr(NCCasesMarch2021,yMarch2021NC);
%NC Marh 2021 Exponential
SRNCMAR2021Exp = sr(NCCasesMarch2021,expMarch21NC);
% r^2 Value
%US March 2020 Linear
rSquaredUSMAR2020Lin = (st(USCasesMarch2020) - SRUSMAR2020Lin) / st(USCasesMarch2020);
%US March 2020 Exponential
rSquaredUSMAR2020Exp = (st(USCasesMarch2020) - SRUSMAR2020Exp) / st(USCasesMarch2020);
%US March 2021 Linear
rSquaredUSMAR2021Lin = (st(USCasesMarch2021) - SRUSMAR2021Lin) / st(USCasesMarch2021);
%US March 2021 Exponential
rSquaredUSMAR2021Exp = (st(USCasesMarch2021) - SRUSMAR2021Exp) / st(USCasesMarch2021);
%NC March 2020 Linear
rSquaredNCMAR2020Lin = (st(NCCasesMarch2020) - SRNCMAR2020Lin) / st(NCCasesMarch2020);
%NC March 2020 Exponential
rSquaredNCMAR2020Exp = (st(NCCasesMarch2020) - SRNCMAR2020Exp) / st(NCCasesMarch2020);
%NC Marh 2021 Linear
rSquaredNCMAR2021Lin = (st(NCCasesMarch2021) - SRNCMAR2021Lin) / st(NCCasesMarch2021);
%NC Marh 2021 Exponential
rSquaredNCMAR2021Exp = (st(NCCasesMarch2021) - SRNCMAR2021Exp) / st(NCCasesMarch2021);
% Standard Error
%US March 2020 Linear
Sy_xUSMAR2020Lin = sqrt(SRUSMAR2020Lin / 29);
%US March 2020 Exponential
Sy_xUSMAR2020Exp = sqrt(SRUSMAR2020Exp / 29);
%US March 2021 Linear
Sy_xUSMAR2021Lin = sqrt(SRUSMAR2021Lin / 29);
%US March 2021 Exponential
Sy_xUSMAR2021Exp = sqrt(SRUSMAR2021Exp / 29);
%NC March 2020 Linear
Sy_xNCMAR2020Lin = sqrt(SRNCMAR2020Lin / 29);
%NC March 2020 Exponential
Sy_xNCMAR2020Exp = sqrt(SRNCMAR2020Exp / 29);
%NC Marh 2021 Linear
Sy_xNCMAR2021Lin = sqrt(SRNCMAR2021Lin / 29);
%NC Marh 2021 Exponential
Sy_xNCMAR2021Exp = sqrt(SRNCMAR2021Exp / 29);
%% Delcare Functions
function aOne = a1(x,y)
aOne = (length(y)*sum(x.*y)-sum(x)*sum(y)) / (length(y)*sum(x.^2)-((sum(x)).^2));
end
function aNought = a0(x,y,a1)
aNought = mean(y) - a1*(mean(x));
end
function SumOfSquareOfResiduals = sr(data,model)
SumOfSquareOfResiduals = sum((data - model).^2);
end
function TotalSumOfSquares = st(data)
TotalSumOfSquares = sum((data - (mean(data))).^2);
end
Tommy Taylor and Katherine Reiss worked as a team to complete this project. Both members completed and turned in the problem solving lab and received feedback on their assignments, then, they used this feedback to create this webpage, pulling strong aspects of both assignments. For example, most figures came from Katherine's initial assignment, while Tommy's alternative approach was used. The descriptions of the methods came mostly from Tommy's initial assignment. Overall, both members exhibited team work and collaboration skills in this problem solving lab.
[1] “City of Arlington Response on the Coronavirus,” Arlington Public Library, 05-May-2020. [Online]. Available: https://arlingtonlibrary.org/news/city-arlington-response-coronavirus. [Accessed: 22- Apr-2021].
[2] Admin, “Linear Interpolation Formula with Solved Examples,” BYJUS, 20-Mar-2020. [Online]. Available: https://byjus.com/linear-interpolation-formula/. [Accessed: 22-Apr-2021].
[3] “COVID-19 Orders & Directives,” NC.gov. [Online]. Available: https://www.nc.gov/covid-19/covid-19-orders-directives. [Accessed: 29-Apr-2021].