turnitin class: 5128261 turnitin pa$$: 2013sl

17
TurnItIn.com class: 5128261 TurnItIn.com pa$$: 2013sl November 5, 2012 – Assign Yourself

Upload: andren

Post on 04-Jan-2016

25 views

Category:

Documents


0 download

DESCRIPTION

November 5, 2012 – Assign Yourself. TurnItIn.com class: 5128261 TurnItIn.com pa$$: 2013sl. Today’s Objective and Agenda. Objective : Make scatterplots, graph functions and find regression curves using Excel Agenda Work through an example together as you ask questions throughout . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

TurnItIn.com class: 5128261TurnItIn.com pa$$: 2013sl

November 5, 2012 – Assign Yourself

Page 2: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Today’s Objective and Agenda Objective: Make scatterplots, graph

functions and find regression curves using Excel

Agenda Work through an example together as you

ask questions throughout. You will have worktime only to:▪ A. Work on your portfolio on these computers▪ B. Study for your probability test for Wednesday

Page 3: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Copy down this data!!!(it is all one table but could not fit)

Age (yrs)

BMI (kg2 per meter)

2 16.4

3 15.7

4 15.3

5 15.2

6 15.21

7 15.4

8 15.8

9 16.3

10 16.8

Age (yrs)

BMI (kg2 per meter)

11 17.5

12 18.18

13 18.7

14 19.36

15 19.88

16 20.4

17 20.85

18 21.22

19 21.6

20 21.65

Page 4: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

First, let’s put the data in Excel.

1. Open Excel. You should be in a blank workbook.

2. Type in your data with x and y at the top.

3. Save the file. (flash drive or on computer)

Page 5: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Second, let’s make a scatterplot.

1. Click on the “Charts” menu.

2. Click “Insert Chart” and scroll down to “Marked Line”.

A scatterplot should appear! Yay! Now right-click on it and click “Format Data Series…”

Page 6: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Still scatterplotting…

Go to “Line” and change “Color” to “No Line” because we just want scatterplot. (If you want, you can delete the legend so it looks like mine. To delete, click the legend, then hit the “delete” key.)

To add into Word, simply click the graph box, copy, then paste into Word. (I copied into PowerPoint!)

0 5 10 15 20 250

5

10

15

20

25

y (sq. kg/m)

Page 7: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Third, we’ll develop a function!

1. Find the right parent function… it doesn’t have to fit every single point perfectly!

a. Use Google Image search to glance through pictures of parent functions.

b. Hint: don’t make your first part too hard since you are doing this analytically at first: the IB loves these by hand: quadratic, cubic, sine

2. Transform! You need to do this analytically…

Page 8: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

(still 3) Transformations!

Choose the parent function. It is totally OK if you say it only works for most

of the graph! In this case, we could choose sin or cos. I pick

sin.

Developing the equation for quadratic or cubic. To solve two lines, you need 2 equations. To solve a quadratic, you need 3 equations. To solve a cubic, you need 4 equations…

Page 9: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Analytically solving a cubic:Either try stretching/shifting or use matrices!

To solve a cubic, we need 4 equations to solve ax3 + bx2 + cx + d = y

First make the equations, then put into matrix form:

a(2)3 + b(2)2 + c(2) + d = 16.4a(8)3 + b(8)2 + c(8) + d = 15.8a(14)3 + b(14)2 + c(14) + d =

19.36a(20)3 + b(20)2 + c(20) + d =

21.65 Next slide: matrix form!

Page 10: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Matrix form!

(Again, you could be doing transformations instead. But this looks more impressive.) Set up a matrix equation in the form: AX

= YA = X = Y =

A-1AX = A-1Y => X = A-1Y You can solve that on your GDC.

(technology!)

Page 11: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Matrix form finished…

You should get: A = -0.004189814815 B = 0.1583333333 C = -1.331388889 D = 18.46296296

For a final equation of y = -0.00419x3 + 0.158x2 – 1.33x + 18.5

Now let’s get back to graphing…

Page 12: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Graphing these points…

Add a third column called Y2 (this will be your data points from your equation), and fill in using a FORMULA:

=-0.00419(A2)^3+0.158(A2)^2-1.33(A2)+18.5

Drag the bar down so it adjusts to each x.

Right-click graph and click “Select Data…”

Page 13: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Continuing the Graph…

Under Series, hit “Add” Then by Y-values,

delete the “{1},” hit the funny-looking button, select our new data (just the numbers) and hit the funny button again.

Then hit OK and you should have this… which is so close it overlaps the scatterplot!

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 200

5

10

15

20

25

Page 14: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Reflecting on the Graph

If it’s close, just make minor adjustments using your knowledge of shifts/stretches and transformations in general.

If it’s not close, you should try another graph analytically – for example, we might try a quadratic for this one instead. You still have to justify the new graph (for example, part of this graph looks like a parabola).

Page 15: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Regression in Excel!!!

1. Make another copy of your graph, then right-click and choose “Select Data…” on the new graph, then delete Series 2.

2. Then right-click chart, hit “format data series,” click “line,” then change color to “no line.”

3. Go to “Chart Layout” and then “Trendline” -> “Trendline options”.

Page 16: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Regression in Excel!!!1. Go to “options.” Check “display eq” and “display

R2”.2. Go to “type” and click around.

3. Try out different ones and pick the best 3 to show in your portfolio! Justify why those make sense (parent functions!) For this one, I would use polynomial order 2, order 3 and exponential. DO NOT use “moving average.”

4. Comment on similarities/differences from your graph.

5. Ask Studies about R2. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 200

5

10

15

20

25

f(x) = − 0.00407453 x³ + 0.14134102 x² − 0.98083058 x + 17.146633R² = 0.999102545963693

y (sq. kg/m)

Page 17: TurnItIn  class: 5128261 TurnItIn  pa$$: 2013sl

Worktime: Two Options

Study for probability test where you are.

Work on your portfolio.