Math 1483 - Quiz 2

<=/Solutions\=>

Remember, ALT+7 gives a new text cell, be sure to explain your answers, if needed!

Problem 1

Your task for this problem will involve visualizing weather data

Part 1

I have a weather station in my back-yard garden, and the temperature is collected every 2 minutes.  The following data sets are spaced 6 hours apart, starting at midnight, for the month of November.  Each entry in the four data sets is of the form (day of November, temp in F).  To load these data sets, simply execute the commands in the cell immediately below this one.

NovTemps6AM = ;
NovTempsNoon  = ;
NovTemps6PM = ;
NovTempsMidnight = ;

Part 2

Create a plot of each of the data sets.  Your plot should include the following:
(1) Make sure the symbols for each set is distinct.
(2) Colour each data set differently.
(3) Add legends for each data set.
(4) Add the appropriate labels to both axes.
(5) Connect the points in each data set by lines. (Hint: This is an option in the ListPlot command)

FourTempsPlot = ListPlot[{NovTemps6AM,NovTempsNoon, NovTemps6PM, NovTempsMidnight}, PlotLegends->{"6AM Temps","Noon Temps","6PM Temps", "Midnight Temps"}, PlotStyle->{Blue, Red, Magenta, Black}, PlotMarkers->{{"▽",12},{"✶",12},{"●",11},{"◆",12}}, AxesLabel->{"Day of November", "Temp (F)"}, Joined->{True, True}, PlotRange->{{0,31},{20,80}}]

Part 3

By inspecting the graph, on which days in November was the temperature at 6:00 PM greater than the temperature at noon?  Explain how you got this information from the graph.

The days where the temperature at 6:00 PM is greater than the temperature at noon are points where the “●” icon lies above the “✶” icon, which are the days November 1st, 4th, 5th, 6th, 13th and 24th.

Part 4

Compute the average and median for all four data sets.

We use the Mean and Median commands here.  The mean is 45.27F, and the median is 45.05F for the 6:00 AM data set.

N[Mean[NovTemps6AM[[All,2]]]]

N[Median[NovTemps6AM[[All,2]]]]

We use the Mean and Median commands here.  The mean is 61.3F, and the median is 60.25F for the noon data set.

N[Mean[NovTempsNoon[[All,2]]]]

N[Median[NovTempsNoon[[All,2]]]]

We use the Mean and Median commands here.  The mean is 58.64F, and the median is 56.55F for the 6:00 PM data set.

N[Mean[NovTemps6PM[[All,2]]]]

N[Median[NovTemps6PM[[All,2]]]]

We use the Mean and Median commands here.  The mean is 49.43F, and the median is 48.0F for the midnight data set.

N[Mean[NovTempsMidnight[[All,2]]]]

N[Median[NovTempsMidnight[[All,2]]]]

Part 5

If you did part 4 correctly, the mean of the 6:00 AM data set was the lowest temperature of the four data sets, similarly the mean of the noon data set was the highest temperature. Construct a data set which is the difference between the noon temperature and the 6:00 AM temperature.

DiffSet = Table[{NovTempsNoon[[i]][[1]],NovTempsNoon[[i]][[2]]-NovTemps6AM[[i]][[2]]},{i,1,Length[NovTempsNoon]}]

Part 6

Plot the difference data set along with the four data sets from Part 2, be sure to use a different colour for the new data set, and add a plot legend for it.

DiffTempPlot = ListPlot[DiffSet, PlotLegends->{"Max Temp Diff"}, PlotStyle->{Orange}, PlotMarkers->{"☺",12}, AxesLabel->{"Day of November", "Temp (F)"}, Joined->{True, True}, PlotRange->{{0,31},{0,40}}];

Show[DiffTempPlot,FourTempsPlot, PlotRange->{{-1,31},{0,77}}]

Part 7

On what days in November were there the largest and smallest changes in temperature between 6:00 AM and noon?  (Hint: There are Max, Min, and Position commands)

We can use the Max command, and the Position command to locate where the max value occurs.  Similarly, we can use the Min command.  The greatest change in temperature was 32F, and it happened on November 15th, and the least change in daily temperature was 0F on November 21st.

NovTempsNoon

Max[DiffSet[[All,2]]]

Position[DiffSet[[All,2]],32.0]

{DiffSet[[16]]}

Min[DiffSet[[All,2]]]

Position[DiffSet[[All,2]],%]

DiffSet[[10]]

Problem 2

A common formula used for counting calories of a food consumed is given by:

TotCal(P,F,C,D) = 4P+9F+4(C-D)

Where T is the total number of calories, P is the number of grams of protein, F is the number of grams of fat, C the total number of grams carbohydrate, and D the number of grams of dietary fiber.

We define the function with the following command.  Be sure to execute it!

TotCal[P_,F_,C_,D_]:=4*P+9*F+4*(C-D)

Part 1

Explain what TotCal(24,12,15,3) represents, and then evaluate it.

This represents the total net calories from a food source with 24 grams of protein, 12 grams of fat, 15 total grams of carbohydrates with 3 of them being from dietary fiber.

TotCal[24,12,15,3]

Part 2

The following is the nutritional information for 2 fried catfish filets:


We can express the total number of calories from a 2 filet (strips) serving of fried catfish in function notation using the function TotCal(P,F,C,D)  as TotCal(16,6,10,1) , and it is evaluated below.

TotCal[16,6,10,1]

Your task:  Find a nutrition facts label on a food that you eat, take a picture, paste it in here, and apply TotCal(P,F,C,D) function to compute the total calories you would consume in a suggested serving size of said food item.

Answers will vary here.

Part 3

Using your answer from Part 2, and being honest with yourself that you could not simply eat the suggested serving size, come up with how many calories you would consume in a proper serving size (i.e. a serving size you would eat).

Answers will vary here, but it should just be a multiple of your answer from Part 2.

Problem 3

The following table gives the number of tornadoes in Oklahoma for each month (January being the first month) of 2021.

({{m=month of 2021, T=number of tornadoes}, {1, 4}, {2, 0}, {3, 3}, {4, 5}, {5,  11}, {6, 1}, {7, 1}, {8, 0}, {9, 0}, {10, 31}, {11, 4}, {12, 0}})

Part 1

Explain in practical terms what T(m) represents.

T(m) is function notation for the number of tornadoes T for the mth month  of the year 2021.

Part 2

Give the value of T(5), and explain in a sentence what it means.

T(5) = 11, and this means there were 11 tornadoes in the 5th month (May) of 2021.

Part 3

For which months of the year 2021 were there more than 3 tornadoes in Oklahoma?

The 1st, 4th, 5th, 10th and 11th months (January, April, May, October, and November) had more than 3 tornadoes in Oklahoma.

Part 4

Can the table be used to estimate the  number of tornadoes in the months before or after those in this table?  Explain your answer.

We cannot, there is no relation between the number of tornadoes one month, and another, so we cannot use this data for trends.

Problem 4

The following graph of active COVID cases in the US was taken from https://www.worldometers.info/coronavirus/country/us/#graph-cases-daily  on December 19th, 2021.  All the questions which follow pertain to this graph.

Part 1

Where is the graph increasing?

The graph is increasing from February 15th 2020 to February 9th 2021, and August 8th 2021 to October 7th, and from November 6th through December 19th (or 6th).

Part 2

Where is the graph decreasing?

The graph is decreasing from February 9th 2021 to August 8th 2021, and  from October 7th to November 6th .

Part 3

State the location of at least one inflection point.

Perhaps the most obvious inflection point is at September 7th 2021, and there is another one between October 7th and November 6th.  September 12th 2020 and March 11th 2021 are two more.

Part 4

Is the graph concave up or concave down at October 12th 2020?

Concave up.

Part 5

Is the graph concave up or concave down at February 9th 2021?

Concave down.