Girish Exploration Project 23

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Girish Bommadevara

Ms. Okanda
Math 3
April 5th 2023

To what extent does daylight time in Johannesburg, South Africa, differ from the daylight time
in Helsinki, Finland over the course of one year?

Introduction:

In this exploration, I will be looking at the change in daylight hours in two different cities on opposite
sides of the world, Helsinki and Johannesburg. I have chosen Helsinki, Finland and Johannesburg,
South Africa. One of the main reasons why I am doing a city so close to the arctic circle would be
because of a video I had watched on YouTube a few months ago. In it, I saw something I couldn’t
believe: a town where the sun never sets; at least for a few months. I believed this would provide me
with incredibly interesting data. Helsinki is closer to the North Pole and Johannesburg is close to the
South Pole. I will be comparing the daylight hours over the period of one year, 2022, and taking data
points for each month of the year.
Gathering Data:

I will be choosing one year as the daylight time for a city will differ throughout the year, but remain
largely the same each year. For example, February may have 10 hours of daylight on average per day
in 1912, and will have 10 hours of daylight on average per day in 2012, even though March will have
a different average daylight time per day in March in both 1912 and 2012. I will take data points every
month as every day would have two many data points, and quarterly may not be enough. I will take
the data on the 15th of every month, as it wouldn't represent the last month (1st of the month), and the
next month (30th of the month). I got the data from the website, “Time and Date.com” This is
considered secondary data.
Plotting the Data:

Firstly, in order to compare and contrast the models of daylight hours in both Helsinki and
Johannesburg, I had to model the daylight hours in one of the cities, and repeat the process for the
other. I had started with Helsinki. The first part of creating a model would be accomplished through
function using plotted data points. To define the variable, the x axis of my graph, the independent
variable would represent time, in months, and the y axis of my graph, the dependent variable would
also represent the time, but in daylength.
I first started off by using the data points collected from the website time and data, as
mentioned earlier. I will represent each month as a “time point”, so I can list the month numerically on
my graph. I will assign time points based on the chronological order of the 12 months of the year, ie.
January is assigned 𝑡1 and December is assigned 𝑡12. However, the data on the time and date website
was listed in Hours: Minutes and Seconds. Data in a graph must have a singular unit. Listing my data
in seconds would have made my numbers too large and detailed, while listing my data in hours would
not show enough detail. I had decided to choose minutes as I believed it would provide an appropriate
amount of detail. I have listed my conversion factors below, a conversion example, and the full raw
and converted data. I will be using 4.s.f for all calculations.

Conversion from Hours : Minutes : Seconds into Minutes

𝑥 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 = (𝐻𝑜𝑢𝑟𝑠 × 60) + 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 + (𝑠𝑒𝑐𝑜𝑛𝑑𝑠/60) Eq.1

Example:

(5 × 60) + 52 + (53/60) = 352. 9 𝑚𝑖𝑛𝑢𝑡𝑒𝑠


Table 1: Day Length in Helsinki over 12 Months

Day Length Day


Month Time Point
(Raw Data) Length(Minutes)
𝐽𝑎𝑛𝑢𝑎𝑟𝑦 6:41:10 𝑡1 401.2
𝐹𝑒𝑏𝑟𝑢𝑎𝑟𝑦 9:11:08 𝑡2 551.1
𝑀𝑎𝑟𝑐ℎ 11:44:30 𝑡3 704.5
𝐴𝑝𝑟𝑖𝑙 14:34:55 𝑡4 874.9
𝑀𝑎𝑦 17:11:19 𝑡5 1031
𝐽𝑢𝑛𝑒 18:52:32 𝑡6 1133
𝐽𝑢𝑙𝑦 18:06:56 𝑡7 1087
𝐴𝑢𝑔𝑢𝑠𝑡 15:41:06 𝑡8 941.1
𝑆𝑒𝑝𝑡𝑒𝑚𝑏𝑒𝑟 12:54:29 𝑡9 774.5
𝑂𝑐𝑡𝑜𝑏𝑒𝑟 10:11:48 𝑡10 611.8
𝑁𝑜𝑣𝑒𝑚𝑏𝑒𝑟 7:31:12 𝑡11 451.2
𝐷𝑒𝑐𝑒𝑚𝑏𝑒𝑟 5:52:53 𝑡12 352.9

Graph 1: Helsinki: Plotted Data Points: Month of the Year vs Daylight Hours

Evaluating the Data:

I knew the data starts and ends in the same place, which means periodicity. This would mean a
trigonometric function is the best example. Additionally, I know day length will fluctuate throughout
the year, but will remain largely the same throughout the years. The next step was deciding whether to
use a sin graph, or a cosine graph. For me, the choice was evident to use a cosine graph as the graph
intercepts the y axis at an extremum point. For a cosine graph, the parameters are 𝑎, 𝑏, 𝑐 𝑎𝑛𝑑
𝑎 𝑐𝑜𝑠𝑏(𝑥 + 𝑐) + 𝑑.
Creating a Model:

To start with 𝑎, it is known as the amplitude. It essentially tells us how much the daylight minutes
fluctuate throughout the year from the average. In this case, we will take the negative value of a, as
the consecutive extremum point is a minimum point. I have listed my calculations below:

Calculations for a

𝑡6−𝑡12
|𝑎| = 2
Eq.2

1133−352.9
= 2

𝑎 = − 390. 1

Secondly, 𝑏, also known as the angular frequency, is very useful in this context for the period
of the function. Firstly, we must include π in some form as it will make sure the x axis will not be
influenced by π, as usually the period of a trig function is in π radians. The period of this function
would be 12, as the function roughly starts and ends in the same place after 12 time points, signifying
periodicity. I have listed my equations for b below.


𝑏 = 𝑃𝑒𝑟𝑖𝑜𝑑
Eq.3


= 12

π
= 6

Next, 𝑐 would in this context be useful for any adjustments required along the x axis, the time
in hours. However, in this context, we wouldn’t need to use c.

Finally, 𝑑, also known as the principal axis, is used in reference to the vertical translation of
the cosine graph. In this context, 𝑑 is in reference to the average daylight minutes of the city
throughout the whole year. In order to calculate 𝑑, we would need to know the amplitude of the
function and the maximum point, which we had calculated when calculating the parameter for 𝑎. I
have listed my calculations for d below.

𝑑 = 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑃𝑜𝑖𝑛𝑡 − 𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 Eq.4

= 1132 − 390. 1

= 741. 9

When we list the parameters together, it gives us the function listed below.

π
𝑓(𝑥) = − 390. 1 𝑐𝑜𝑠( 6 (𝑥)) + 741. 9 Eq.5
Graph 2: Helsinki : Graphed Function Modelling: Month of the Year vs Daylight Hours

Evaluation of Data:

The data model must be re-evaluated, as the highest and lowest data points, the extremums in the
model may not reflect the highest data points in real life. The highest and lowest data point of the
entire year is what we are looking for. We are definitely going to find this in the same month of the
highest data point in the current model, 𝑡6. We would need to use the new value of 𝑡6 for the
re-calculation of our parameters. This month would be June 2022. The exact day would be the 21st of
June. In regards to the lowest data point, it can be found in December 2022, 𝑡12. The exact day would
be the 21st of December. I have listed my calculations for the day below, using the same formula used
with the data calculations for the other Helsinki data points.

Extremum Point Calculations:

Using Eq.1, the longest average day length was:

𝑦 = 1136 𝑚𝑖𝑛𝑢𝑡𝑒𝑠

Using Eq.1, the shortest average day length was:

𝑦 = 349 𝑚𝑖𝑛𝑢𝑡𝑒𝑠

Table 2: Day Length in Helsinki: Extremum Points

Day
Day Length
Month Time Point Length(In
(Raw Data)
Minutes)
𝐽𝑢𝑛𝑒 18:55:49 𝑡6 1136
𝐷𝑒𝑐𝑒𝑚𝑏𝑒𝑟 05:49:00 𝑡12 349
This finding of the ‘true’ extremum points ultimately leads to a reconsideration of the parameters 𝑎
and 𝑑 .
I used Eq.2 to recalculate 𝑎

𝑎 = − 393. 5

I used Eq.4 to recalculate 𝑑

𝑑 = 742. 5

This gives us the new and corrected function:

π
𝑓(𝑎) = − 393. 5 𝑐𝑜𝑠( 6 (𝑥)) + 742. 5 Eq.6

Graph 3: Helsinki: Correctly Graphed Function: Month of the Year vs Daylight Hours

Mathematical Evaluation of Data:

Once we have the most accurate graph possible based on evaluation methods, we need to understand
if this graph accurately models the average day length in Helsinki. We can do mathematically through
2 2
calculating the 𝑟 value. The 𝑟 values gives us a number between 0 and 1. The larger the number is,
2
the more accurate our data is. According to Investopedia, the standard for a “good” 𝑟 value could be
0.9 or higher. The formula for calculations is listed below.

2 (𝑆𝑆𝑟𝑒𝑠)
𝑟 = 1 − (𝑆𝑆𝑡𝑜𝑡)
Eq.7

2
The 𝑟 Values provide a mathematical analysis of how accurate the model is based on two
factors: how close the actual values of our data are to the predicted values(SSres), and how much
variance there is in our data(SStot). The value of (SSres/SStot) is often less than 1, which is why we
2
will subtract it from 1. The smaller the value of (SSres/SStot), the larger the 𝑟 value. Let me provide
you with an explanation of each part.

Firstly, we use (SSres), or the Sum of the Squared Residuals, to directly calculate the variance
between our predicted values given by the model, and the values of our data set. The formula for
(SSres) is given below.

2
𝑆𝑆𝑟𝑒𝑠 = ε(𝑦 − ŷ) Eq.8

In this formula, we first have the residual:

𝑦 − ŷ

The residual is the difference between the actual 𝑦 values for a given x, or in this case t value,
and the predicted 𝑦 value, denoted as ŷ. The actual 𝑦 value can be carried over from our data table. ŷ
can simply be calculated through inputting an 𝑡 value (𝑥 value).

Secondly, we would have the squaring section. This is done to ensure that all values are
positive, as ŷ can be larger than the 𝑦 value.

2
(𝑦 − ŷ)

Finally, we would repeat the process to ensure we find all of the squared residuals from 𝑡1to
𝑡6 and sum the squared residuals of all the 12 points.
2
ε(𝑦 − ŷ)

Using this equation, I was able to create a table of the Sum of Squared Residuals as well.

Table 3: Calculations of Sum of Squared Residuals for Helsinki

Point Equation
Actual Day
Intersects- Square of Sum of Squared
Time Point Length in Residual
Predicted Day Residuals Residuals
Minutes
Length
𝑡1 401.2 401.7 -0.500 0.25
𝑡2 551.1 545.8 5.300 28.09
𝑡3 704.5 742.5 -38.00 1444
𝑡4 874.9 939.3 -64.40 4147
𝑡5 1031 1083 -52.00 2704
𝑡6 1136 1136 0 0
𝑡7 1087 1083 4.000 16
𝑡8 941.1 939.3 1.800 3.24
𝑡9 774.5 742.5 32.00 1024
𝑡10 611.8 545.8 66.00 4356
𝑡11 451.2 401.7 49.50 2450
𝑡12 349.0 349.0 0 0 1670
What I found particularly interesting was that the input values with the smallest residuals were
the input values I used to define the majority of my parameters. This shows a clear picture of how my
model must pass through the points I chose to use.

Additionally, I was able to create a table of the Total Sum of Squares using the formula listed
below:
2
𝑆𝑆𝑡𝑜𝑡𝑎𝑙 = ε(𝑦 − Ȳ) Eq.9

In this formula, we first have what is called the deviation:

(𝑦 − Ȳ)

The deviation is the difference between the actual 𝑦 values for a given x, or in this case t
value, and the mean 𝑦 value for all the inputs, denoted as ŷ. The actual 𝑦 value can be carried over
from our data table. Ȳ must be calculated through using the equation below, Eq. 10

𝑡1+𝑡2+𝑡3+𝑡4+𝑡5+𝑡6+𝑡7+𝑡8+𝑡9+𝑡10+𝑡11+𝑡12
𝑀𝑒𝑎𝑛 𝐷𝑎𝑦 𝐿𝑒𝑛𝑔𝑡ℎ(𝑖𝑛 𝑚𝑖𝑛𝑢𝑡𝑒𝑠) = 12
Eq.10

401.2+ 551.1+704.5+874.9+1031+1136+1087+941.1+774.5+611.8+451.2+349.0
= 12

= 742. 8

After we find the deviation for each given data point, we must square the deviation as the
deviation may be negative.

2
(𝑦 − Ȳ)

Finally, in similarity to finding the SSres, we must find the squared deviations of all the
points, from 𝑡1to 𝑡12, and then sum them all up.
2
ε(𝑦 − Ȳ)
Table 4: Calculations of Total Sum of Squares for Helsinki

Point Equation
Actual Day
Intersects- Square of Total Sum of
Time Point Length in Deviations
Predicted Day Deviations Squares
Minutes
Length
𝑡1 401.2 742. 8 -341.6 116700
𝑡2 551.1 742. 8 -191.7 36750
𝑡3 704.5 742. 8 -38.3 1467
𝑡4 874.9 742. 8 132.1 17450
𝑡5 1031 742. 8 288.2 83060
𝑡6 1136 742. 8 393.2 154600
𝑡7 1087 742. 8 344.2 118500
𝑡8 941.1 742. 8 198.3 39320
𝑡9 774.5 742. 8 31.70 1005
𝑡10 611.8 742. 8 -131.0 17160
𝑡11 451.2 742. 8 -291.6 85030
𝑡12 349.0 742. 8 -393.8 155100 826100
Finally, now that we have both the Total Sum of Squares and the Sum of Square Residuals, we can
2
calculate the corresponding 𝑟 value.

2
𝑟 = 0. 998

2
This is an incredibly accurate model, as Investopedia states models that have an 𝑟 values above 0.900
are considered to be very accurate.

Second City: Johannesburg, South Africa

I have now been able to successfully model the average daylight in Helsinki over the course of one
year. I would like to repeat my modeling with a completely different city on the opposite side of the
world; Johannesburg, South Africa. I would guess that most parts of my function would stay the same
with slight variations. The amplitude should not change much, as I would expect a similar amount of
change in daylength for both cities over the course of one year. The period remains the same, giving
another similar parameter. There is no horizontal translation. The principal axis should also be very
similar in both situations. This is because the principal axis is by definition the average amount of
daylight throughout the year. For Helsinki, this worked out to around 12 hours of daylight. I would
predict this value would be similar to that of Johannesburg, as it is a well known scientific fact that
half the planet is always in day and half the planet at night. However, the main difference I would
predict would be when the day length hours are longer. I know that day length is shorter during the
winter and longer during the summer. However, the Finnish winter is around December-February,
whilst the South African winters are around June-July. This is why I would predict they would be at
opposite extremism points during January and June.

Table 5: Day Length in Johannesburg over 12 Months

Day Length Day Length


Month Time Point
(Raw Data) (Minutes)
𝐽𝑎𝑛𝑢𝑎𝑟𝑦 13:35:51 𝑡1 815.9
𝐹𝑒𝑏𝑟𝑢𝑎𝑟𝑦 12:58:13 𝑡2 778.2
𝑀𝑎𝑟𝑐ℎ 12:15:24 𝑡3 732.9
𝐴𝑝𝑟𝑖𝑙 11:28:15 𝑡4 688.3
𝑀𝑎𝑦 10:50:15 𝑡5 650.3
𝐽𝑢𝑛𝑒 10:30:19 𝑡6 630.3
𝐽𝑢𝑙𝑦 10:38:43 𝑡7 638.7
𝐴𝑢𝑔𝑢𝑠𝑡 11:11:13 𝑡8 671.3
𝑆𝑒𝑝𝑡𝑒𝑚𝑏𝑒𝑟 11:55:34 𝑡9 715.6
𝑂𝑐𝑡𝑜𝑏𝑒𝑟 12:41:27 𝑡10 761.5
𝑁𝑜𝑣𝑒𝑚𝑏𝑒𝑟 13:23:58 𝑡11 804.0
𝐷𝑒𝑐𝑒𝑚𝑏𝑒𝑟 13:46:20 𝑡12 826.4

Same conversion formulas used with Helsinki were used with Johannesburg

I repeated the process I used to plot that data for Helsinki again with the data for Johannesburg.
Graph 4: Johannesburg: Plotted Data Points: Month of the Year vs Daylight Hours

My decision to use a cosine graph was based on the same ideas mentioned above. However, in this
case, I had decided to use a positive cosine graph as the data points had started at a maximum
extremum point.

I calculated the parameters in the same way I did for Helsinki, using equations 2, 3 and 4

When we list the parameters together, it gives us the function listed below.

π
𝑓(𝑏) = 98 𝑐𝑜𝑠( 6 (𝑥)) + 728. 3 Eq.11

It’s now necessary for me to plot Eq.11 onto the data points from graph 4 in order to better visualize it.
Graph 5: Johannesburg: Graphed Function: Month of the Year vs Daylight Hours

The data model must be re-evaluated, as the highest and lowest data points in the model may not
reflect the highest and lowest data points in real life. The highest data point and lowest data point of
the entire year is what we are looking for. We are definitely going to find this in the same month of the
highest data point in the current model, 𝑡12. This month would be December 2022. The exact day
would be the 22nd of December. In regards to the lowest data point, it would be in June 2022, 𝑡6. The
exact day would be the 21st of June. I have listed my calculations for both of the days below, using
the same formula used with the data calculations for the Helsinki data points.

Highest Data Point Calculations


(13 × 60) + 47 + (09/60) = 827. 2 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
Lowest Data Point Calculations
(10 × 60) + 29 + (44/60) = 629. 7 𝑚𝑖𝑛𝑢𝑡𝑒𝑠

Table 6: Day Length in Johannesburg Extremum Points

Day Length Day Length(In


Month Time Point
(Raw Data) Minutes)
𝐽𝑢𝑛𝑒 10:29:44 𝑡6 629.7
𝐷𝑒𝑐𝑒𝑚𝑏𝑒𝑟 13:47:09 𝑡12 827.2

This finding of the ‘true’ maximum and minimum extremum points ultimately leads to a
reconsideration of the parameters a and d.

I had recalculated 𝑎 based on Eq.2


𝑎 = 98. 75

I had recalculated 𝑑 based on Eq.4

𝑑 = 728. 45

This gives us a new function.

π
𝑓(𝑔) = 98. 75 𝑐𝑜𝑠( 6 (𝑥)) + 728. 5 Eq.12

Now I will graph Eq.12 onto Graph 6.

Graph 6: Johannesburg: Correctly Graphed Function: Month of the Year vs Daylight Hours

2
Identical to the evaluation method used with Helsinki, we shall be calculating the 𝑟 values for the
Johannesburg model as well.

Using Eq.8, I was able to create a table of the Sum of Squared Residuals.
Table 7: Calculations of Sum of Squared Residuals for Johannesburg

Point Equation
Actual Day
Intersects: Square of Sum of Squared
Time Point Length in Residual
Predicted Day Residuals Residuals
Minutes
Length
𝑡1 815.9 813.2 2.700 7.290
𝑡2 778.2 777.3 0.900 0.810
𝑡3 732.9 728.3 4.600 21.16
𝑡4 688.3 679.3 9.000 81.00
𝑡5 650.3 643.2 7.100 50.41
𝑡6 629.7 630.3 -0.600 0.360
𝑡7 638.7 643.4 -4.700 22.09
𝑡8 671.3 679.3 -8.000 64.00
𝑡9 715.6 728.3 -12.70 161.3
𝑡10 761.5 777.3 -15.80 249.6
𝑡11 804.0 813.2 -9.200 84.64
𝑡12 826.3 826.3 0.000 0 742.7

Using Eq.9, I was able to create a table for Total Sum of Squares as well. As listed earlier, the first
step to finding the total sum of squares was finding the mean of all the points.

Using Eq.10, the mean day length in minutes would be as follows:

𝑀𝑒𝑎𝑛 𝐷𝑎𝑦 𝐿𝑒𝑛𝑔𝑡ℎ(𝑖𝑛 𝑚𝑖𝑛𝑢𝑡𝑒𝑠) = 726. 1

Table 8: Calculations of Total Sum of Squares for Johannesburg

Point Equation
Actual Day Intersects- Square of Total Sum of
Time Point Deviations
Length in Minutes Predicted Day Deviations Squares
Length
𝑡1 815.9 726.1 89.80 8064
𝑡2 778.2 726.1 52.10 2714
𝑡3 732.9 726.1 6.800 46.24
𝑡4 688.3 726.1 -37.80 1429
𝑡5 650.3 726.1 -75.80 5746
𝑡6 629.7 726.1 -96.40 9293
𝑡7 638.7 726.1 -87.40 7639
𝑡8 671.3 726.1 -54.80 3003
𝑡9 715.6 726.1 -10.50 110.3
𝑡10 761.5 726.1 35.40 1253
𝑡11 804.0 726.1 77.90 6068
𝑡12 826.3 726.1 100.2 10040 55410
Finally, now that we have both the Total Sum of Squares and the Sum of Square Residuals, we can
2
calculate the corresponding 𝑟 value listed below

2
𝑟 = 0. 986
Conclusion:

Graph 7: Johannesburg and Helsinki Models Combined

The key properties of the models of the average day length in minutes per month over the course of
one year in two different cities, Helsinki and Johannesburg, follow the same core properties of a
sinusoidal function but have slight variations in terms of amplitude. Firstly, January, when the model
starts, is an extreme point for the day length in both cities, due to the fact that it is either summer, with
the longest day length of the year or the winter, with the shortest day length of the year. This led to the
difference in positivity between the models. The magnitude of the amplitude was also a point of huge
difference. All other factors, inclusive of the angular frequency and principal axis (as shown by the
green line), largely remained the same. However, this difference in amplitude intrigued me quite a bit.
After further research, I found that the amplitude is more varying in the northern hemisphere because
the earth is on a tilted orbit around the sun, meaning that the northern hemisphere experiences more
sunlight during the summer months than the southern hemisphere would in the summer months for the
south. In short, the variance of day length is dependent on how directly the sun is in contact with you.
In conclusion, through this project, I was able to learn more about the very practical examples of how
physics shall be integrated with math, and how mathematicians are able to model the scientific
phenomena of the natural world.

Personal Reflection;

There are many skills that I had learned from this project, but the two most important would be
learning how to write a mathematical report for the first time and learning more about data evaluation.
I had chosen to do the specific data evaluation of r squared as I believed it would give a challenge in a
rather common project. I am happy I learned how to evaluate data, even if it was in a very basic
method. I am also happy I learned more physics as to why these models work the way they do. I do
wish I had more personal connection to the topic itself, not just the cities. One of my ideas was to
create a piece wide function of a linear and a cubic, with my preliminary tests showing me it would be
a better match than even my sinusoidals. However, it was already too late. Overall, I believe that I
could have challenged myself more, but I have learned many unexpected skills through this project.

Works Cited:

“R-Squared: Definition, Calculation Formula, Uses, and Limitations.” Investopedia,


Investopedia, 5 Apr. 2023, https://www.investopedia.com/terms/r/r-squared.asp.

“Helsinki, Finland - Sunrise, Sunset, and Daylength, April 2023.” Sunrise and Sunset Times in
Helsinki, https://www.timeanddate.com/sun/finland/helsinki.

“Johannesburg CBD, Gauteng, South Africa - Sunrise, Sunset, and Daylength, April 2023.”
Sunrise and Sunset Times in Johannesburg CBD,
https://www.timeanddate.com/sun/@11429001.

You might also like