Calculus Review - Brown...

48
Calculus Review Slides adapted from: Texas A&M University Dept. of Statistics

Transcript of Calculus Review - Brown...

Calculus Review

Slides adapted from: Texas A&M University

Dept. of Statistics

In This Review

•  Differentiation – Differentiation formulas – Examples – Trig. functions

•  Integration –  Indefinite integrals – Definite integrals – Trig. Functions

Also In This Review

•  Calculus in statistics – Continuous distributions – Expected value and mean – Variance – Median

About Notation

As is common in statistics, we will use log to mean loge instead of log10 as is commonly used in mathematics.

Differentiation The derivative provides us information about the rate of change of a function. The derivative of a function is also a function. Example: The derivative of the rate function is the

acceleration function.

Ways to Write the Derivative

dxd

Given the function f(x), we can write its derivative in the following ways: - f`(x) - f(x) The derivative of x is commonly written dx.

Differentiation Formulas The following are common differentiation formulas: - The derivative of a constant is 0. - The derivative of a sum is the sum of the derivatives.

0=cdud

)(')('))()(( ugufugufdud

+=+

Examples - The derivative of a constant is 0. - The derivative of a sum is the sum of the derivatives.

=7dud

=+ )4(tdtd

More Formulas

duunudud nn 1* −=

- The derivative of u to a constant power: - The derivative of e: - The derivative of log:

dueedud uu =

duu

udud 1)log( =

More Examples

=33xdxd

- The derivative of u to a constant power: - The derivative of e: - The derivative of log:

=yedyd 4

=)log(3 xdxd

Product and Quotient The product rule and quotient rules are commonly used in differentiation. - Product rule: - Quotient rule:

)(')()(')())(*)(( ufugugufugufdud

+=

2))(()(')()(')(

)()(

ugugufufug

uguf

dud −

=⎟⎟⎠

⎞⎜⎜⎝

Product and Quotient Examples - Product rule: - Quotient rule:

=))log(3( zzdzd

=⎟⎠

⎞⎜⎝

⎛ueu

dud

3

7

Chain Rule The chain rule allows you to combine any of the differentiation rules we have already covered. - First, do the derivative of the outside and then do the derivative of the inside.

duugugfugfdud *)('*))(('))(( =

Chain Rule Examples

=)log( 2 vevdvd

=)log( vedvd

=vvee

dvd

Try These

yyyg 24)( 3 +=

11)( += zzf

xexh 3)( =

xxxp )log()(2

=

3)()( zezq z −=

yyeys 24)( =

Solutions

212)(' 2 += yyg

1)(' =zf

xexh 33)(' =

2

2 )log(2)('xxxp −

=

)1()(3)(' 2 −−= zz ezezq

yy eyeys 22 48)(' +=

Integration The integral provides us with information about the area under a function. The indefinite integral of a function is a function, but the definite integral may be a number. Example: The integral of the rate function is the

distance function. Integrating over a specified time tells us how far we have gone.

Ways to Write the Integral The two forms of integration, indefinite and definite, can be distinguished by the presence of limits on the integral. - indefinite - definite

∫b

adxxf )(

∫ dxxf )(

Integration Formulas The following are common integration formulas. *Note these are the ‘opposite’ of the derivative formulas, hence the integral is also called the antiderivative. When doing the indefinite integral, you must add a constant to your function.

Integration Formulas

cuduu

+=⎟⎠

⎞⎜⎝

⎛∫ )log(1

- The integral of a sum is the sum of the integrals. - The integral of u-1:

∫ ∫∫ +=⎟⎠

⎞⎜⎝

⎛ + duu

duuduu

u nn 11

Examples

=⎟⎠

⎞⎜⎝

⎛∫ dt

t21

- The integral of a sum is the sum of the integrals. - The integral of u-1:

( ) =+∫ dxx 4

More Formulas

1−≠n

- The integral of u to a constant power:

for - The integral of e: - The integral of the derivative:

cun

duu nn ++

= +∫ 1

11

cedue uu +=∫

cufduuf +=∫ )()('

More Examples - The integral of u to a constant power:

- The integral of e:

=∫ dyy3

=∫ dve v2

Definite Integrals We will use the formulas already given for the indefinite integral, but we will take one additional step. Evaluate the integral at the upper bound and subtract the value of the integral at the lower bound.

∫ −=+−+=b

aafbfcafcbfdxxf )()())(()()('

Definite Integral Examples

∫− =1

1dtet

∫ =1

02xdx

Try These

=⎟⎠

⎞⎜⎝

⎛ −∫ dxex

x21

∫ =+ dyyy )36( 5

=∫4

0

2dxx

Solutions

cexdxex

xx +−=⎟⎠

⎞⎜⎝

⎛ −∫ 22

21)log(1

cyydyyy ++=+∫ 265

23)36(

3644

0

2 =∫ dxx

Calculus in Statistics There are many calculus applications in statistics including: - continuous density functions - finding the expected value (mean) of a distribution - finding the variance (standard deviation) of a distribution - finding the median of a distribution

Continuous Density Function The probability density function (pdf) of a variable tells us the probability of a certain event when a continuum of events is possible. Example:

The probability of getting the exact value of π from the set of all real numbers.

The pdf of x is usually noted by the lowercase f, i.e. f(x).

Cumulative Density Function The cumulative density function (cdf) of a variable tells us the probability for all events in a range. The cdf of x is usually noted by the capital F, i.e. F(x). Example:

For a standard normal distribution, F(-0.22)=P(z≤-0.22)=0.4129.

Notes About the pdf The pdf of a variable is said to have a value of 0 for any specific event. Example:

From our example earlier, we can never get the exact value of π.

For all x, f(x)≥0. The integral of the pdf over all events is 1.

Notes About the cdf The cdf has values between 0 and 1. The limit as x approaches -∞ is 0 and the limit as x approaches ∞ is 1. The cdf is an increasing function. The cdf can be ‘flat’ for a range of values, so some people prefer to think of it as non-decreasing.

Calculus and pdf & cdf The cdf measures the area under the pdf. When given the pdf, we can do an indefinite integral to find the cdf. If given the cdf, we can differentiate to find the pdf. We will also use calculus to find information about the pdf such as the mean, median, and variance.

Try This Show that the pdf f(x)=1/6 integrates to 1 when x=(0,6). Find F(x).

Answer

xxF

xdxdxxf

61)(

10*616*

61

61

61)(

6

0

6

0

6

0

=

=−=== ∫∫

Show that the pdf f(x)=1/6 integrates to 1 when x=(0,6). Find F(x).

Try This One Too Given the cdf F(t)=1-e-t when t=(0,∞), find the pdf and show that it integrates to 1.

Another Answer

1)1(0)()(

)(0

000=−−=−−−=−==

=

∞−∞−∞ −∞

∫∫ eeedtedttf

etftt

t

Given the cdf F(t)=1-e-t when t=(0,∞), find the pdf and show that it integrates to 1.

Expected Value The expected value is the mean of a distribution. Example:

The expected value for the standard normal is 0.

The expected value is commonly written as E(X).

To find the expected value, we use the following formula. The expected value of f(x)=1/6 where x=(0,6) is

Expected Value Formula

∫= dxxfx )(*E(X)

303121

61*)(*E(X)

6

0

26

0

6

0=−==== ∫∫ xdxxdxxfx

Median

X~

The median of a distribution is the number in the middle. 50% of the area under the distribution is above the value and 50% is below it. The median, like the expected value (mean), is a measure of the center of a distribution. The median of the distribution function f(x) is commonly written .

To find the median, we use the following formula. In this formula, M is the median. To find the median of f(x)=1/6 where x=(0,6), we solve the equation above for M. So M= =3.

Median Formula

∫ ∞− =M

dxxf 5.0)(

661

61)(5.0

000

MxdxdxxfM

MM==== ∫∫

X~

The variance of a distribution function tells us about how spread out the possible events are. A large variance means the events are more spread out. The standard deviation is the square root of the variance. The variance is often written as V(X) or Var(X).

Variance

To find the variance, we use the following formula. E(X), the expected value, is the same as before and E(X2) is computed similarly.

Variance Formula

22 E(X))()E(XVar(X) −=

∫= dxxfx )(*)E(X 22

To find the variance of f(x)=1/6 where x=(0,6), first find E(X2). Now use the variance formula.

Variance Example

3)3(12E(X))()E(XVar(X) 222 =−=−=

12012181

61*)(*)E(X

6

0

36

0

26

0

22 =−==== ∫∫ xdxxdxxfx

Try This Find the expected value, median, and variance for the distribution f(y)=2y for y in (0,1).

Answer

1/18Var(X)0.5X~2/3E(X)

=

=

=

Find the expected value, median, and variance for the distribution f(y)=2y for y in (0,1).

Suppose that X has probability density

f(x) =

(1

(1+x)2 X > 0,

0 otherwise.

1. Find P (X > 3)

2. Find E(X)

[Solution]

1.

P (X > 3) =

Z 1

3

1

(1 + x)

2dx = � 1

1 + x

|13 =

1

4

(1)

2.

E(X) =

Z 1

0

x

(1 + x)

2dx =

Z 1

0(

1

1 + x

� 1

(1 + x)

2)dx

=

Z 1

0

1

1 + x

dx� 1 = log(1 + x)|10 � 1 = 1(2)