math 2uu3 lecture 7 - ms.mcmaster.ca · whatare)buy)and)sell)rates?)...
TRANSCRIPT
Propor%onal rela%onship:
Quan%%es A and B are called propor%onal if one is a mul%ple of the other, i.e.,
A = some number *B
examples: • conversion of units • scaling • money exchange • percent
common: 1 kg = 2.2 lb and 1 lb = 1/2.2 kg = 0.45 kg precise: 1 kg = 2.20462 lb and 1 lb = 0.45359 kg
2.2*2.99=6.578 2.20462*2.99=6.5918
2.99/lb or 6.59/kg
Currency exchange:
one currency = conversion factor * another currency
conversion factor is called buy rate or sell rate depending on whether we’re buying or selling currency
or, conversion factor could be some kind of average rate
Average exchange rates (used for certain types of transac%ons)
Bank of Canada: http://www.bankofcanada.ca/rates/exchange/daily-converter/
Different banks/ins%tu%ons offer different rates …
hUps://www.uexchange.ca/compare-‐rates.php
Rates at 4:22:22 pm on 12 February 2020
And they fluctuate (change) all the %me
hUps://www.google.com/search?q=currecncy+exchange+euro+cdn+dollar&ie=u^-‐8&oe=u^-‐8&client=firefox-‐b-‐ab
Rates at 11:45:00 pm on 12 February 2020
Example of buy and sell rates
Example: Euro Rates at 4:20:02 pm on 12 February 2020
Sco%abank: hUps://www.sco%abank.com/ca/en/0,,7662,00.html
What are buy and sell rates?
Example: Sco%abank, exchange rates between Canadian Dollar and Euro (data from 12 Feb 2020)
1.4899 1.4044
Which is buy rate, which is sell rate?
If not clear: compute the conversion that you need using both rates, and the one that’s worse for you (beUer for the bank, exchange kiosk) is the right one
Beware ... there are places with very unfavourable exchange rates
Example: Toronto Pearson Airport ice exchange kiosk
If you have $1,000 US, and wish to convert to Cdn$ (then this kiosk BUYS US$ from you) you will get $1,099.70 Cdn
But if you have Cdn $ but need to buy $1,000 US (the kiosk SELLS US$ to you) you need to pay $1, 432.71 Cdn
Op%onal: hUps://www.theguardian.com/money/2018/jun/23/holiday-‐money-‐best-‐cards-‐currency-‐rates-‐bank-‐charges-‐cash
Op%onal: hUps://www.theguardian.com/money/2018/jun/23/holiday-‐money-‐best-‐cards-‐currency-‐rates-‐bank-‐charges-‐cash
Among other pieces of advice:
i.e., it’s always beUer to pay in the currency of the country we’re in
Make a decision …
Remember:
Called “dynamic currency conversion” which is onen a rip-‐off
select without conversion
Some%mes purposely unclear, to confuse …
Op%onal reading: hUps://bit.ly/2y2XPU8
Conversion of units -‐ there are many online calculators
Note: no need to memorize conversion factors (but it’s good to know some)
SI units are universal, and based on decimal system
Other units are s%ll in use; we’re used to it, but some%mes it’s confusing; for example
1 GB pint = 20 GB fl oz = 568 ml (1 GB fl oz = 28.4131 ml) 1 US pint = 16 US fl oz = 473 ml (1 US fl oz = 29.5735 ml)
ounces are not equal: 1 GB fl oz = 0.96 US fl oz
next slide: 20 US fl oz = 591.25 ml
why 591ml? because 20 US fl oz = 591.25 ml
Percent:
20% of A = 0.2 * A
Propor%onal in two ways:
with respect to percent and with respect to quan%ty
Op%onal reading: hUp://www.bbc.com/news/science-‐environment-‐38210837
Problem set 7, ques%on #24
Is the math correct?
Increase from 30 to between 33 -‐ 36 vs about 10 -‐ 20% increase
Important ques%on – always ask % of what?
Look at increase from 30 per 1000 to 36 per 1000 – that’s an (absolute) increase of 6 per 1000
Rela%ve (compared to something else): If 6 is compared to 30 … it is 20% If 6 is compared to 1000 … it is 0.6%
So it is both 20% and 0.6% increase!
Why did the authors pick the 20% increase angle?
To make a (stronger) point!
Linear change = all marginal changes are equal
Linear change = result of accumula%on (posi%ve or nega%ve)
posi%ve marginal changes (posi%ve slope)
increasing quan%ty
nega%ve marginal changes (nega%ve slope)
decreasing quan%ty
Compare: non-‐linear quan%ty (marginal changes differ)
marginal change from 1 to 2
marginal change from 10 to 11
Why do we care about linear paUern/ linear func%ons?
It’s easy to work with and understand (visual representa%on is a line)
Certain data sets can be described using linear func%ons (this process is called linear regression)
Regression
We wish to understand and use a data set (which can have thousands, or millions of data points)
Assume that the data set models a rela%onship between one independent variable (explanatory, input) and one dependent variable (response, output)
Idea: reduce the data set to a mathema%cal curve, figure out how well that curve represents the data, and use that curve to draw conclusions (such as interpola%on and extrapola%on)
If that curve is a line – linear regression (we will also do exponen%al regression)
We use a linear regression calculator (the link is on the 2UU3 page) hUps://keisan.casio.com/exec/system/14059929550941
and do not worry about how regression is calculated, but how to interpret and use what the calculator gives us
here is how it will work ...
x ... percent on tests 1 and 2 y ... final grade
How to make sense of this data? How can we use it?
Idea: compute the line that best approximates the data; that line is called a line of regression or a trendline
Using sonware or a regression calculator (details soon) we obtain the following data:
correla%on coefficient
line of regression
where: x = success on the first two tests combined (%) y = final course grade
Using sonware or a regression calculator (details soon) we obtain the following data:
correla%on coefficient
line of regression
Interpolate: if x=60, then y= 0.7565(60)+18.95=64.34 if x=82, then y= 0.7565(82)+18.95=80.98
Extrapolate: if x=105, then y= 0.7565(105)+18.95=98.35
Correla%on coefficient (denoted by r) tells us how well a linear model explains the rela%onship between the variables
In our case: we assumed a linear rela%onship between the success on tests 1, 2 and the final course grade; is this assump%on reasonable, i.e., how reliably can a line describe the data set we have?
Of course, there are outliers (data points “outside” of a paUern), but what is a “general trend”?
Correla%on coefficient (no need to memorize all this)
Memorize: r larger than 0.7 … strong posi%ve correla%on r smaller than -‐0.7 … strong nega%ve correla%on
x y 0 1.5 1 2 2 1.5 3 3 4 3
Sample linear regression calcula%on, 5 data points:
x y
0 1.5
1 2
2 1.5
3 3
4 3
enter into online regression calculator
y = A+Bx = 1.4+0.4x
r = 0.83 ... strong posi%ve correla%on
output ...
Another example:
y = A+Bx = 6.36-‐1.1x
r = -‐0.78... strong nega%ve correla%on
Climate change = change in sta%s%cs about weather paUerns, due to:
• plate tectonics • volcanic errup%ons and changes in the atmosphere • solar effects • human popula%on and human ac%ons, animals,etc.
Climate change happens all the %me – but the big difference is this %me humans are the dominant cause and are accelera%ng the pace of the changes on Earth
Climate change indicators – important quan%ta%ve measures
• Average global temperature
• Concentra%on of CO2 in the atmosphere
• Arc%c Sea ice extent (extent = area)
• Volume of Arc%c Sea ice
• Rising levels of oceans
Assume it’s 1950 ... extrapolate to predict average global temperature in 2010-‐2020
enter the data into regression calculator…
Correla%on coeff. r =0.66
r is not larger than 0.7, so the correla%on is not strong
It is posi%ve or nega%ve correla%on?
What is the slope of the regression line? What does it mean, what are its units?
scaUer plot (ie, data points) and the line of regression
thus average temperature = 13.674 + 0.004t
where t is in years, t=0 represents 1880 (t=100 represents 1980, t=130 represents 2010, etc.)
predic%on for 2010 (extrapola%on) average temperature = 13.674 + 0.004*130 = 14.194 degrees C
compare to actual data ...
Actual data
Conclusion: linear regression model does not give a good es%mate (regression coefficient suggests only a moderate (i.e., not strong) correla%on)
Linear regression: illicit drug overdose deaths in B.C.
hUp://www.cbc.ca/news/canada/bri%sh-‐columbia/a-‐year-‐of-‐overdoses-‐7-‐charts-‐that-‐show-‐the-‐scope-‐of-‐b-‐c-‐s-‐drug-‐crisis-‐1.3910246
Problem: Predict the number of deaths for 2016
269 366
Y=A+Bx= 269+48.5x
so
OD = 269+48.5x
Note: correla%on coefficient =1
Extrapolate (%me=4) … OD=463
Major conclusion:
Extrapola%on can be very wrong, even when the correla%on coefficient is high!
What can we do? • Look at more detailed data (monthly vs yearly) • Try different pairs of points, and then compute the average of all extrapola%ons • Try with (lot) more data points
End of 2016?
Trends are difficult to iden%fy !!!
Possible approach: take two newest data points and assume linear growth
Y=A+Bx= 366+144x
so
OD = 366+144*%me
Note: correla%on coefficient =1
Extrapolate (%me=2) … OD=654
Possible approach: take more data (say from 2010 to 2015) and assume linear growth
211 330
510
366
269
292
t=0 in 2010
Enter data, then Execute
Y=A+Bx= 202.7+50.8x
so
OD = 202.7+50.8*%me
Note: correla%on coefficient =0.9
Extrapolate (%me=6) … OD=507.5
hUps://w
ww.businessinsider.com
/cho
colate-‐con
sump%
on-‐vs-‐no
bel-‐
prizes-‐2014-‐4
Further data … can build more linear models
Extrapolate to predict average global temperature in 2010
Actual data
The Keeling Curve (in Problem set 9, ques%ons 5, 6)
hUps://scripps.ucsd.edu/programs/keelingcurve/