110
Midterm informa-on What does it cover? What should I expect? See: Midterm Informa-on page on the wiki

What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Midterminforma-on

•  Whatdoesitcover?•  WhatshouldIexpect?See:MidtermInforma-onpageonthewiki

Page 2: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

What’sdueandwhen?•  OSH4:

•  Pleasenotethatthedeadlineis8:59pm,Fri,Oct20Donotcountonbeingabletosubmitlater,ortosenditbyemailaMerthedeadline.

Page 3: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

LeastsquaresdatafiRng;ChainRule

Page 4: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Leastsquares(Linearregression)datafiRngcont’d..

UBCMath102

Page 5: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Fromlast-me.

•  Wearegivensomedataandwanttodescribeitstrend.

•  Howdowefitthebestlinethroughthedata?

•  Thisisaprac-alapplica-onofcalculus,becauseitinvolvesminimiza-on.

•  “LeastsquaresfiRng”–auseful(andmathema-callysimple)procedure

UBCMath102

Page 6: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Learninggoals

•  UnderstandwhatdatafiRngmeansinthesimplest(linearleastsquares)seRng.

•  Understandtheconnec-ontoop-miza-on•  Beabletofitaliney=ax+bdatapoints•  Instruc-onsforhowtouseaspreadsheettofitalinetodata

Page 7: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Last-me:Example

•  Rainfalloverthreedays

•  Findafor“bestline”

UBCMath102

Day 1 2 3

Rain(cm) 2 3.3 4

Page 8: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Whatis“best”line?

•  Choselineforwhichtheresidualsareassmallaspossible!(minimize!)

UBCMath102

y=ax

(x1,y1)(xn,yn)

(xi,yi)

Page 9: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Whatisaresidual?

Residual=datavalue-theore-calvalue=yi–axi

UBCMath102

y=ax

(x1,y1)(xn,yn)

(xi,yi)

Page 10: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

“Sumofsquareresiduals”

•  SSR=(y1-ax1)2+(y2-ax2)2+...+(yn-axn)2•  Short-handnota-on: SSR(a)=MinimizingSSR(a)isequivalenttofindingtheslopeofthelineforwhichthedevia-onsofdatafromthelinearesmallestoverall.

UBCMath102

Page 11: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Liney=ax;bestfitvalueofa:

•  WeshowedthatthiswasobtainedbyminimizingSSR

•  Theop-malvalueoftheslopeofthelinetofitthedata!

Page 12: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Defini-ons

•  Amodelisafunc-onusedtorepresentorfitdata.Forexample,somecommonones:f(x)=ax,f(x)=ax+b,f(x)=Ce-kx.

•  Residualsareameasureofhowfareachmodelvalueisfromthedatavalue:ri=yi-f(xi).

•  TheSumofSquaredResiduals(SSR)isameasureofhowwellthemodelfitsallthedata:SSR=∑(yi-f(xi))2.

•  SmallerSSRisbeher.UBCMath102

Page 13: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

“Bestfit”

•  Thebestfitmodelisthemodelwithparametervalue(s)(a,aandb,etc)thatgivesthesmallestSSR.

UBCMath102

Page 14: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(1)Bestfitlinewithintercepty=ax+b

•  Theresidualsare(A)axi+b(B)(axi+b)2(C)yi-(axi+b)(D)yi2-(axi+b)2(E)yi-axi

Page 15: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Residualsforliney=ax+b

•  ri=yi-(axi+b)

(x1,y1)

(xn,yn)

(xi,yi)

y=ax+b

Page 16: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(2)Forbestfitlinewithintercepty=ax+b

•  Theresidualsareyi-(axi+b)andwewillminimize

(A)Σyi-(axi+b)(B)Σ|yi-(axi+b)|(C)Σ(yi-(axi+b))2(D)Σyi2-(axi+b)2(E)Noneoftheabove

Page 17: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(3)Forbestfitlinewithintercepty=ax+b

•  WewillminimizeSSR=Σ(yi-(axi+b))2Withrespectto

(A)a(B)b(C)xi(D)xiandyi(E)bothaandb

Page 18: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(4)Howwouldwedothat?

Findvalueofaandbsuchthat

(A) d(SSR)/da=0(B) d(SSR)/db=0(C) Both(A)and(B)(D) noneoftheabove(E) Noclue

UBCMath102

Page 19: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Challenge!

•  Forfun:Calculatevaluesofofaandbsuchthat

d(SSR)/da=0ANDd(SSR)/db=0WhereSSR=Σ(yi-(axi+b))2

UBCMath102

Page 20: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Bestfitlinewithintercepty=ax+b

•  RESULT:(SeeSupplementonwiki,noneedtomemorizethese!)

•  Where:

UBCMath102

Page 21: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Bestfitlinewithintercepty=ax+b

•  Manyspreadsheets(excel,Google-sheets)willcomputesuchlinesforyouautoma-cally

•  Someslidesfollowwithinstruc-ons.Orsee:M102Wiki

UBCMath102

Page 22: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Assignment7:Problem14

Usingaspreadsheettofitatrend-linetodata:yisthetotalvolumeofallchloroplastsinsideagivencellwithvolumexWanted:givendata,fittoit

Page 23: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Manyspreadsheetswillfitdata

Excel:HighlighttherowscontainingxanyvaluesInsert;chart;scaherplot

UBCMath102

Page 24: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Excelhasautoma-c“fitline”func-on

UBCMath102

y=0.5887x+0.0282R²=0.99493

0

0.5

1

1.5

2

2.5

3

3.5

4

0 1 2 3 4 5 6 7

AxisTitle

AxisTitle

y

y

Linear(y)

Page 25: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Or,useGooglesheets

UBCMath102

Page 26: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Hereweshowhowtocalculatebestfitsfromscratch

•  CopythedatafromtheWebworkques-on

PasteintoGooglesheets(donotretype!)

Page 27: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Picksomevalueofaandcomputetheresiduals

UBCMath102

Page 28: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Residuals

UBCMath102

Page 29: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Squareresiduals

UBCMath102

Page 30: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

SumofSquareResiduals(SSR)

UBCMath102

Page 31: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Computeslopeforbestfitliney=ax

UBCMath102

Page 32: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

•  xiyi•  xi2•  Σxiyi•  Σxi2

• 

•  (Thisisbestslope)

UBCMath102

Computeslopeforbestfitliney=ax

Page 33: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

TheSSRshouldbesmallforthebestfitline

•  LargeSSRforarbitraryvalueofa:

•  MuchsmallerSSRwhenweplugintheavaluewefound.

UBCMath102

Page 34: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Plotthedata

•  MakeascaherplotofthedataandgetGooglesheetstofitabestlinetoit.

y=ax+b•  Note:wecanalsodothisourselvesbycalcula-ngthequan--esaandbfromthedata

UBCMath102

Page 35: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Makeascaherplot

•  Highlightthecellswithdata,includinglabels

•  Insertchart:

UBCMath102

Page 36: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Formatchart

•  Start

•  Switchrowsandcolumns•  UsecolumnAasheaders

UBCMath102

Page 37: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

•  Charts

•  Scaher•  (Selecttopchoice)

•  Insert

Page 38: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Dataplotwillappear

UBCMath102

Page 39: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Addtrendline•  {Controlclick}onchart

•  Advancededit

•  Customize•  Scrolldownmenu•  SelectTrendline;linear

UBCMath102

Page 40: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Trendlinewillappear

UBCMath102

Page 41: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Clickingonlinedisplaystrendline

UBCMath102

Page 42: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Lineagreeswithourowncalcula-ons

•  Calculatedvalues

Page 43: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Calcula-ons

•  Cells:

UBCMath102

Page 44: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

ChainRule-Intro

UBCMath102

Page 45: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Func-oncomposi-on

•  Afunc-ony=g(f(x))

UBCMath102

Page 46: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Whatisthecorrectdecomposi-on?

•  Ifthefunc-onisThenthedecomposi-onis

Page 47: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Herearevaluesoff(x)atafewpoints

Thenf(f(3))isequalto:A.  3B.  -3C.  0D.  -2E.  2

Page 48: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(1)Func-oncomposi-on

UBCMath102

Page 49: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(2)Func-oncomposi-on

UBCMath102

Page 50: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

ChainRuleofdifferen-a-on

•  Ify=g(u)andu=f(x)arebothdifferen-ablefunc-onsandy=g(f(x))isthecompositefunc-on,thenthechainruleofdifferen-a-onstatesthat

UBCMath102

Page 51: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

CoffeeBudget

•  Rateofincreaseofmoneyspentoncoffee =

Rateofincreaseofpricepercup-mesRateofincreaseofcupsIdrink

Page 52: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(3)ChainRuleexample

UBCMath102

Page 53: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-on

•  Thefunc-onis.Let

UBCMath102

Page 54: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(4)Chainruleexample

Computethederiva-veof)

UBCMath102

Page 55: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(4)ChainruleexampleThederiva-veofis

(A)(B)(C)(D)(E)Noneoftheabove

UBCMath102

Page 56: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Chainruleexample(2)

Thederiva-veofis:Quo-entrule:

Page 57: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Chainruleappliedtoop-miza-on

UBCMath102

Page 58: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Anttrails

Page 59: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Iloveants!(butnotinmykitchen)

UBCMath102

Page 60: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Anttrails

Ants:trailforminginanarena•  hhps://www.youtube.com/watch?v=-lz97WTM7aU

Ants:pheromonemarkings•  hhps://www.youtube.com/watch?v=tAe3PQdSqzg

Page 61: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Anttrails

•  Antscanfindtheshortestroutethatconnectstheirnesttoafoodsource.

•  eachantsecretesachemicalpheromonethatotherantswillfollow.

UBCMath102

Page 62: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Findtheminimumtraillengthconnec-ngnesttotwofoodsources

UBCMath102

Page 63: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Somepossibletrails

•  Wecanthinkofseveralwaystogetfromthenesttothefood

Page 64: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(1)AV-shapedanttrail

•  WhatisthetotallengthofthisVshapedtrail?

UBCMath102

Page 65: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(2)AT-shapedanttrail:

•  WhatisthetotallengthofthisTshapedtrail?

UBCMath102

Page 66: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(3)Whichpathisshorter?

(A) TheVpath.(B) TheTpath.(C)Theyarethesamelength.(D)ItdependsondandD.

UBCMath102

Page 67: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

ItdependsondandD!

Example:supposeD=1ThelengthofTpathVpathàLargestdependsond!

Page 68: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Smallvslarged

•  larged smalld

Page 69: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(4)Yshapedtrail

Whatisthetotallengthofthetrailshown?

UBCMath102

Page 70: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(5)TheAnttrailproblem

WehavenowfoundthelengthLYoftheY-shapedpath.Whatarewegoingtodonext?

UBCMath102

Page 71: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(6)Whatistherangeofvaluesofx?

Ly(x)=

UBCMath102

Page 72: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Deriva-ve

Usethechainruletofindthederiva-veofthisfunc-on:

UBCMath102

Page 73: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(7)Deriva-veThederiva-veofthefunc-onfortheY-shapedpathlengthis

Page 74: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(8)Cri-calPoints

Thecri-calpointsare:

UBCMath102

Page 75: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Cri-calpoints

•  Set

UBCMath102

Page 76: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Annotherwaytogetthesolu-on

Minimalsurfaces(a.k.a.“soapbubbles”)

UBCMath102

Page 77: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Asolu-onbysoap!

Twoflatplexiglassplateswith“pegs”represen-ngthenestandfoodsources:Idea:credittoShawnDesaulniers

Page 78: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Asolu-onbysoap!

Soapbubblesformminimalsurfaces(i.e.shapesthathavethesmallestpossiblesurfaceareaforgivenconstraints:Herethreepegsand2flatplatesformtheconstraintsthatthesoapsurfacehastomeet.

Page 79: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Asolu-onbysoap!

Thepegsandflatplatessetaconstantheightinthezdirec-on:Hencethesoapbubbleselectsaconfigura-onwithshortestlengthinthexyplane

z

xy

Page 80: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Now-metofinishthecalculusproblem(forprac-ce)

UBCMath102

Page 81: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(9)Arewedoneyet?

(A) No,wes-llneedtofindthelengthL(x)atthecri-calpoint.

(B) Nowes-llneedtofindhowfarapartthefoodsourcesare,i.e.solveford

(C) No,weneedtocheckthetypeofcri-calpoint

(D) Yes,wearedone

UBCMath102

Page 82: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Checkingviathesecondderiva-ve

Findthesecondderiva-veofthefunc-onRecallthatthefirstderiva-veis

UBCMath102

Page 83: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-on:

Seeanearlierchain-rulederiva-veproblem,andExample8.5intheM102Notes.(Sowhatdoesthistellus?)

UBCMath102

Page 84: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

(10)Whatdoesthistellus?

(A) Thesecondderiva-vecanbeeitherposi-veornega-ve,sothecri-calpointcouldbeofeithertype

(B) Thesecondderiva-veisalwaysposi-vesothecri-calpointisalocalminimum.

(C) Thesecondderiva-veisalwaysposi-vesothecri-calpointisalocalmaximum.

UBCMath102

Page 85: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Sketchingtheoriginalfunc-on

Sketchthefunc-on(Remember,thisisanalterna-vetofirstorsecondderiva-vetestsfordiagnosingacri-calpoint.)

UBCMath102

Page 86: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Sketchingtheoriginalfunc-on

Sketchthefunc-on•  Smallx:L≈(D-x)+2d=C-x(straightline,slope-1)

UBCMath102 x

Page 87: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Sketchingtheoriginalfunc-on

Sketchthefunc-on•  Smallx:L≈(D-x)+2d=C-x•  Largex:L≈(D-x)+2x=D+x(straightline,slope+1)

UBCMath102 x

Page 88: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Sketchingtheoriginalfunc-on

Sketchthefunc-on•  Smallx:L≈(D-x)+2d=C-x•  Largex:L≈(D-x)+2x=D+xConnectthesesmoothly!verifiesaLOCALMIN

UBCMath102 x

Page 89: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Desmos

•  Graphofthefunc-onwithD=1

UBCMath102

Page 90: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Forfurtherstudy:Angles

WhatanglesdoestheYtrailform?Wefoundthat

UBCMath102

Page 91: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Angles

WhatangledoestheYtrailform?Seeifyoucananswerthisfornext-me.

Page 92: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

AnswersDatafiRng•  1C•  2C•  3E•  4C

Anttrails•  1D•  2A•  3D•  4B•  5B•  6C•  7E•  8B•  9C•  10B

UBCMath102

Page 93: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Problemstotestyourskill

Page 94: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

MC3

Eachofthegraphsrepresentsf(t),theamountoffoodgainedduring-metspentinafoodpatch.Whichofthesegraphsrepresentsthetypeofpatchwherefoodcanbecollectedrapidlyatfirst,butthereisonlysomemaximalamountthatcanbeobtainednomaherhowlongthesearchcon-nues?

UBCMath102

Page 95: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

MC5

Theabsolutemaximumofthefunc-ony=f(x)=x+1/xontheinterval0.1≤x≤2occursat

UBCMath102

Page 96: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

MC6

Lety=f(x)beasmoothfunc-on(deriva-vesofallordersexist)atx0.Whichofthefollowingstatementsiscorrect?

UBCMath102

Page 97: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Relatedproblems

Prac-cetheChainRule

UBCMath102

Page 98: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-on

UBCMath102

Page 99: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-onstopreviousproblemsFirsttryouttheproblemsattheendofthelastlectureslides.Onlythenshouldyou“peek”attheanswers.

• 

Page 100: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Op-malforaging

UBCMath102

Solu-on

Page 101: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-on

HenceQ’(t)=R’(t)(sincepisaconstant).sothatmaximizingQturnsouttobethesameasmaximizingRasdoneinthelecture.Sot=

Page 102: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Moreop-malforaging

• 

Solu-on

Page 103: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

• 

Page 104: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Cannonball

UBCMath102 Solu-on

Page 105: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-on:

Page 106: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Reviewproblem(1)

Solu-on:

UBCMath102

Page 107: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

ReviewProblem(2)

Solu-on:

UBCMath102

Page 108: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

ReviewProblem(3)

UBCMath102 Solu-on

Page 109: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-onto(3a)

UBCMath102

Page 110: What does it cover? What should I expect? See: Midterm ...keshet/M102/Lect2017_7.2.pdf · Definions • A model is a func-on used to represent or fit data. For example, some common

Solu-onto(3b)

UBCMath102