Data Analysis

31
Data Analysis or why I like to draw straight lines

description

Data Analysis. or why I like to draw straight lines. Engineers like Lines. Two parameters for a line m slope of the line b the y intercept. b = 5 m = (-5/2.5) = -2 y = -2x +5. How Do We Make Trend Lines?. How Do We Make Trend Lines?. e 6. e 5. e 4. e 3. e 2. e 1. - PowerPoint PPT Presentation

Transcript of Data Analysis

Page 1: Data Analysis

Data Analysis

or why I like to draw straight lines

Page 2: Data Analysis

Engineers like Lines Two parameters for a line

m slope of the line b the y intercept

-5

0

5

10

15

-4 -2 0 2 4

b = 5

m = (-5/2.5) = -2

y = -2x +5

Page 3: Data Analysis

How Do We Make Trend Lines?

4

6

0 0.25 0.5 0.75 1

Page 4: Data Analysis

How Do We Make Trend Lines?

4

6

0 0.25 0.5 0.75 1

e1

e2

e3

e4

e5

e6

i i ie y mx b 2 2

0 0i i

i i

e e

m b

Page 5: Data Analysis

How do we evaluate lines?

y = 1.0054x + 0.0461

R2 = 0.6975

-0.4

0

0.4

0.8

1.2

0 0.25 0.5 0.75 1 1.25

y = 1.0326x - 0.0779

R2 = 0.8984

0

0.4

0.8

1.2

0 0.25 0.5 0.75 1 1.25

y = 1.0201x + 0.1187

R2 = 0.9532

0

0.4

0.8

1.2

0 0.25 0.5 0.75 1 1.25

One of these things is not like the other, one of these things does not belong

Page 6: Data Analysis

Plot ei vs xi

4

6

0 0.25 0.5 0.75 1

e1

e2

e3

e4

e5

e6

Good lines have random, uncorrelated errors

Page 7: Data Analysis

Residual Plots

-0.2

-0.1

0

0.1

0.2

0 0.25 0.5 0.75 1 1.25

-0.2

-0.1

0

0.1

0.2

0 0.2 0.4 0.6 0.8 1 1.2

-0.3

-0.15

0

0.15

0.3

0 0.2 0.4 0.6 0.8 1 1.2

Page 8: Data Analysis

Why do we plot lines?

0

0.5

1

1.5

2

0 0.25 0.5 0.75 1

Page 9: Data Analysis

Why do we plot lines?

0

0.5

1

1.5

2

0 0.25 0.5 0.75 1

y = mx + b

Page 10: Data Analysis

Why do we plot lines?

0

0.5

1

1.5

2

0 0.25 0.5 0.75 1

y = Aebx

Page 11: Data Analysis

Why do we plot lines?

0

0.5

1

1.5

2

0 0.25 0.5 0.75 1

y = Ax2 + Bx + C

Page 12: Data Analysis

Why do we plot lines?

Lines are simple to comprehend and draw We are familiar with slope and intercept as

parameters We can linearize many functions and plot

them as lines Many functions can be expressed as Taylor

Series

Page 13: Data Analysis

Taylor Series

2 3( ) ( )( )

2! 3!

f a f af x f a f a x a x a x a

2 311

1x x x

x

3 5 7

sin3! 5! 7!

x x xx x

2 4 6

cos 12! 4! 6!

x x xx

2 3 4

12! 3! 4!

x x x xe x

Page 14: Data Analysis

Linearizing Equations

We have non linear function v = f(u) v = u3

v = 2eu+5u v=u/(u-4)

We want to transform the equation into y=mx+b

Page 15: Data Analysis

Linearizing Data continued33y x

0

30

60

90

0 0.5 1 1.5 2 2.5 3 3.5x

y

Page 16: Data Analysis

Linearizing Data continued

-8

-6

-4

-2

0

2

4

6

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5

ln( ) ln(3) 3ln( )y x

ln(x)

ln(y)

Page 17: Data Analysis

Linearizing Data continued

2 3 5xy

-10

0

10

20

30

40

50

0 0.5 1 1.5 2 2.5 3

x

y

Page 18: Data Analysis

Linearizing Data

-2

0

2

4

-3 -2 -1 0 1 2 3 4

ln( 5) ln 3 ln(2)y x

x

ln(y+5)

Page 19: Data Analysis

Enzyme Kinetics

Page 20: Data Analysis

0

2

4

6

8

10

0 5 10 15 20 25

Substrate Concentration

Ra

te o

f P

rod

uc

t F

orm

ati

on

Enzyme Production

max[ ]

[ ]m

V Sv

K S

Vmax

½*Vmax

Km

Vmax = 10

Km = 1

Michaelis - Menten

Page 21: Data Analysis

Linearization of Enzyme Kinetics

0

0.1

0.2

0.3

0.4

0.5

0 1 2 3 4

1/[S]

1/v

max[ ]

[ ]m

V Sv

K S

max max max

[ ]1 1

[ ] [ ]m mK S K

v V S V S V

Page 22: Data Analysis

Engineers often use logarithms to solve problems

What is a Log?

logab = x b = ax

Logarithms are the inverse functions of exponential functions

Page 23: Data Analysis

Most important log bases

log10 = log We like to count in powers of 10

loge = ln Nature likes to count in powers of e

And maybe …

log2

Computers count in bits

Page 24: Data Analysis

What are the important properties of logs? log(a*b) = log(a) +log(b)

log(ab) = b*log(a)

Page 25: Data Analysis

Why do we care about logs?

Nature likes power law relationships

y = k*uavbwc

For some reason a,b,c are usually either integers, or nice fractions

log(y) = log(k)+a*log(u)+b*log(v)+c*log(w) Pretty close to linear - we can use linear regression

Page 26: Data Analysis

Buckling in the Materials Lab

From studying the problem we expect that buckling load (P) is a power law function of Radius R, and Length L

Page 27: Data Analysis

How would you design an experiment for the pendulum?

L

M

g

Keep Mass constant – vary L

Keep Length constant – vary M

Keep mass and length constant – vary g

Page 28: Data Analysis

Where do log-log plots break down? Two or more power laws

y=k1*uavb + k2ucvd

s(t)=-g/2*t2+v0t+s0

E=mgh+1/2*mv2

Page 29: Data Analysis

y = 1.0074x - 0.0434

0

0.5

1

1.5

0 0.2 0.4 0.6 0.8 1

Extra Stuff on Lines

Page 30: Data Analysis

Extra Stuff on Lines

y = 0.935x + 0.014

0

0.5

1

1.5

0 0.2 0.4 0.6 0.8 1

Page 31: Data Analysis

More Extra Stuff on Lines

y = 1.2853x - 0.2709

0

0.5

1

1.5

0 0.2 0.4 0.6 0.8 1