Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 14: Monday, May 2

Size: px
Start display at page:

Download "Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 14: Monday, May 2"

Transcription

1 Logistics Week 14: Monday, May 2 Welcome to the last week of classes! Project 3 is due Friday, May 6. Final is Friday, May 13. Lecture Wednesday will be a review, and section this week will be devoted to practice exam problems. Come with questions. Problem du jour What is the expected output of the following code? X = 20 (rand(1,n) 0.5); fx = exp( X.ˆ2/2); gx = 1/20; lx = fx./gx; result = mean(lx); errbar = std(lx)/sqrt(n); Answer: The result should converge to E[l(X)] where X is uniform on [ 10, 10] and l(x) = 20 exp( x 2 /2). The probability density function for X is { 1/20, 10 x 10 g(x) = 0, otherwise. and the expected value is E[l(X)] = R l(x)g(x) dx = exp( x 2 /2) dx, which should be quite close to 2π. We ve created some bias by truncating at ±10, but this error is nowhere near as large as the statistical error due to Monte Carlo.

2 Variance reduction The problem above is a simple example of Monte Carlo integration. We now want to see how to make this simple example more efficient by reducing the variance of the estimator. We will approach this in a few different ways. Importance sampling Let us consider the computation 2π = 2 exp( x 2 /2) dx. 0 Using the idea of the problem du jour, we could estimate 2π by drawing uniform samples on [0, L] for L large enough. But this estimator has rather high variance, and the variance gets larger the larger L is. This is intuitive in that most of the sample points don t really matter to the computation, since exp( x 2 /2) decays very quickly away from zero. The integrand exp( x 2 /2) is largest near the origin, so we get the most contribution to our integral when we have samples near zero. Therefore, it makes sense to use a method that samples more frequently near the origin, rather than sampling uniformly over some large range of x values 2π = 2 0 exp( x 2 /2) exp( x) where X is an exponential random variable. exp( x) dx = 2E[exp( X 2 /2)/ exp( X)] % lec27zmean2(n) % % Compute sqrt(2 pi) by Monte Carlo. Use importance sampling. function [result, err ] = lec27zmean2(n) if nargin < 1, N = 1000; end Y = log(rand(1,n)); fy = exp( Y.ˆ2/2); gy = exp( Y)/2; ly = fy./gy;

3 result = mean(ly); err = std(ly)/sqrt(n); Control variates I want to compute the expectation of l(x) = exp(x x 2 /2), but perhaps I ve decided its too hard. But I know that most of the interesting behavior is near the origin, so perhaps I can approximate l(x) by a polynomial over some interval close to zero. Let s try just interpolating by a quadratic at x = 0, x = 1, and x = 2, and discarding everything past x = 2: { e ( e 1)(x 1) 2, x [0, 2] h(x) = 0, otherwise. While h(x) is not identical to l(x), the two random variables surely are correlated. Furthermore, we can compute E[h(X)] analytically; a somewhat tedious calculus exercise yields E[h(X)] = e(1 e 2 ) ( e 1)(1 5e 2 ). The fact that h(x) and l(x) should be correlated, together with the fact that we can compute E[h(X)] in closed form, makes h(x) an ideal candidate to serve as a control variate with which we can construct a better estimator, as we shall now see. First, note that E[l(X)] = E[l(X) ch(x)] + ce[h(x)]. So ˆl c (X) = l(x) ch(x) + ce[h(x)] has the same expected value that l(x) does; but var[ˆl c (X)] = var[l(x)] 2c cov[l(x), h(x)] + c 2 var[h(x)]. If we choose c = cov[l(x), h(x)]/ var[h(x)], we have var[ˆl c (X)] = var[l(x)] ( 1 corr[l(x), h(x)] 2). If l(x) and h(x) are highly correlated, then ˆl c (X) may have a much lower variance than l(x). Of course, computing the covariance analytically is hard, but we can always do it numerically.

4 % lec27zmean4(n) % % Compute sqrt(2 pi) by Monte Carlo. Use importance sampling + % a control variate. function [result, err ] = lec27zmean4(n) if nargin < 1, N = 1000; end Y = log(rand(1,n)); fy = exp( Y.ˆ2/2); gy = exp( Y)/2; ly = fy./gy; hy = ( sqrt(e) (sqrt(e) 1) (Y 1).ˆ2 ). double( Y<2 ); EhY = ( sqrt(e) (1 eˆ 2) (sqrt(e) 1) (1 5 eˆ 2) ); cs = sum( (ly mean(ly)). (hy EhY) )/sum( (hy EhY).ˆ2 ); W = ly + cs (hy EhY); result = mean(w) err = std(w)/sqrt(n); Antithetic variables Now let s turn to the problem of computing π/4 by throwing darts at [0, 1] 2 and seeing what fraction lie inside the unit circle. Note that if (X i, Y i ) is a uniform random sample from the square, then (1 X i, 1 Y i ) is a correlated sample. It turns out that if φ is the indicator for the unit circle, then φ(x i, Y i ) and φ(1 X i, 1 Y i ) have negative covariance; this makes sense, since only one of them can be outside the unit circle (though both could be the same). Therefore, the estimator φ(x, Y )/2 + φ(1 X, 1 Y )/2 actually has lower variance than φ(x, Y ). This is the method of antithetic variables. % lec27pi mc(n) % % Compute pi by Monte Carlo. Use antithetic variables. function [result, err ] = lec27pi mc2(n,d)

5 if nargin < 1, N = 1000; end if nargin < 2, d = 2; end % Version 2: Antithetic variates XY = rand(d,n); XY2 = 1 XY; trials1 = double(sum(xy.ˆ2,1)<1); trials2 = double(sum(xy2.ˆ2,1)<1); trials = ( trials1 +trials2)/2; result = mean(trials); shat = std(trials ); err = shat/sqrt(n); A concluding note I will not ask you about variance reduction on the final exam, but if you ever find yourself using Monte Carlo methods, it is worth knowing the basic ideas of these methods. Much of the sophistication in getting Monte Carlo methods to run fast is in finding good variance reduction techniques. Accelerating another method to compute π Recall way back at the beginning of the semester, we discussed a way of computing the semiperimeters s k of 2 k -gons as a way of computing π. This turned out to be equivalent to finding a recurrence to compute s k = 2 k sin(2 k π), and when we Taylor expand the sine function, we have s k = π + C 1 4 k + C 2 16 k + C 3 64 k +... where C 1, C 2, C 3, etc. are constants that do not depend on k. The most straightforward estimate, π s k, therefore has a predictable error that is roughly proportional to 4 k. But what if we tried to combine several semiperimeters to get a better estimate?

6 Let s start simple, and try taking a linear combination of s k and s k+1 : αs k + βs k+1 = (α + β)π + (4α + β)c 1 4 k 1 + O(16 k ). If we choose α = 1/3 and β = 4/3, we solve the linear system α + β = 1 and 4α + β = 0. Therefore, 4s k+1 s k 3 = π + O(16 k ). If we take an appropriate combination of s k+2, s k+1, and s k, we can do even better, getting an approximation with error O(64 k ). This is linear convergence, but it is ferociously fast nonetheless.

Joint Probability Distributions and Random Samples (Devore Chapter Five)

Joint Probability Distributions and Random Samples (Devore Chapter Five) Joint Probability Distributions and Random Samples (Devore Chapter Five) 1016-345-01: Probability and Statistics for Engineers Spring 2013 Contents 1 Joint Probability Distributions 2 1.1 Two Discrete

More information

Stochastic Simulation Variance reduction methods Bo Friis Nielsen

Stochastic Simulation Variance reduction methods Bo Friis Nielsen Stochastic Simulation Variance reduction methods Bo Friis Nielsen Applied Mathematics and Computer Science Technical University of Denmark 2800 Kgs. Lyngby Denmark Email: bfni@dtu.dk Variance reduction

More information

Lecture 21: Counting and Sampling Problems

Lecture 21: Counting and Sampling Problems princeton univ. F 14 cos 521: Advanced Algorithm Design Lecture 21: Counting and Sampling Problems Lecturer: Sanjeev Arora Scribe: Today s topic of counting and sampling problems is motivated by computational

More information

MATH 2554 (Calculus I)

MATH 2554 (Calculus I) MATH 2554 (Calculus I) Dr. Ashley K. University of Arkansas February 21, 2015 Table of Contents Week 6 1 Week 6: 16-20 February 3.5 Derivatives as Rates of Change 3.6 The Chain Rule 3.7 Implicit Differentiation

More information

1.4 Techniques of Integration

1.4 Techniques of Integration .4 Techniques of Integration Recall the following strategy for evaluating definite integrals, which arose from the Fundamental Theorem of Calculus (see Section.3). To calculate b a f(x) dx. Find a function

More information

MATH141: Calculus II Exam #4 7/21/2017 Page 1

MATH141: Calculus II Exam #4 7/21/2017 Page 1 MATH141: Calculus II Exam #4 7/21/2017 Page 1 Write legibly and show all work. No partial credit can be given for an unjustified, incorrect answer. Put your name in the top right corner and sign the honor

More information

MAT01A1: Functions and Mathematical Models

MAT01A1: Functions and Mathematical Models MAT01A1: Functions and Mathematical Models Dr Craig 21 February 2017 Introduction Who: Dr Craig What: Lecturer & course coordinator for MAT01A1 Where: C-Ring 508 acraig@uj.ac.za Web: http://andrewcraigmaths.wordpress.com

More information

B553 Lecture 1: Calculus Review

B553 Lecture 1: Calculus Review B553 Lecture 1: Calculus Review Kris Hauser January 10, 2012 This course requires a familiarity with basic calculus, some multivariate calculus, linear algebra, and some basic notions of metric topology.

More information

Applied Calculus I. Lecture 29

Applied Calculus I. Lecture 29 Applied Calculus I Lecture 29 Integrals of trigonometric functions We shall continue learning substitutions by considering integrals involving trigonometric functions. Integrals of trigonometric functions

More information

MATH 18.01, FALL PROBLEM SET # 2

MATH 18.01, FALL PROBLEM SET # 2 MATH 18.01, FALL 2012 - PROBLEM SET # 2 Professor: Jared Speck Due: by Thursday 4:00pm on 9-20-12 (in the boxes outside of Room 2-255 during the day; stick it under the door if the room is locked; write

More information

DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES.

DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES. DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES. ANDREW SALCH. PDEs and ODEs, order, and linearity. Differential equations come in so many different

More information

Mathematics 1 Lecture Notes Chapter 1 Algebra Review

Mathematics 1 Lecture Notes Chapter 1 Algebra Review Mathematics 1 Lecture Notes Chapter 1 Algebra Review c Trinity College 1 A note to the students from the lecturer: This course will be moving rather quickly, and it will be in your own best interests to

More information

Monte-Carlo MMD-MA, Université Paris-Dauphine. Xiaolu Tan

Monte-Carlo MMD-MA, Université Paris-Dauphine. Xiaolu Tan Monte-Carlo MMD-MA, Université Paris-Dauphine Xiaolu Tan tan@ceremade.dauphine.fr Septembre 2015 Contents 1 Introduction 1 1.1 The principle.................................. 1 1.2 The error analysis

More information

Lecture 5: Special Functions and Operations

Lecture 5: Special Functions and Operations Lecture 5: Special Functions and Operations Feedback of Assignment2 Rotation Transformation To rotate by angle θ counterclockwise, set your transformation matrix A as [ ] cos θ sin θ A =. sin θ cos θ We

More information

Monte Carlo Integration. Computer Graphics CMU /15-662, Fall 2016

Monte Carlo Integration. Computer Graphics CMU /15-662, Fall 2016 Monte Carlo Integration Computer Graphics CMU 15-462/15-662, Fall 2016 Talk Announcement Jovan Popovic, Senior Principal Scientist at Adobe Research will be giving a seminar on Character Animator -- Monday

More information

Calculus II Practice Test Problems for Chapter 7 Page 1 of 6

Calculus II Practice Test Problems for Chapter 7 Page 1 of 6 Calculus II Practice Test Problems for Chapter 7 Page of 6 This is a set of practice test problems for Chapter 7. This is in no way an inclusive set of problems there can be other types of problems on

More information

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem. CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 10 The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

More information

March 4, 2019 LECTURE 11: DIFFERENTIALS AND TAYLOR SERIES.

March 4, 2019 LECTURE 11: DIFFERENTIALS AND TAYLOR SERIES. March 4, 2019 LECTURE 11: DIFFERENTIALS AND TAYLOR SERIES 110211 HONORS MULTIVARIABLE CALCULUS PROFESSOR RICHARD BROWN Synopsis Herein, we give a brief interpretation of the differential of a function

More information

εx 2 + x 1 = 0. (2) Suppose we try a regular perturbation expansion on it. Setting ε = 0 gives x 1 = 0,

εx 2 + x 1 = 0. (2) Suppose we try a regular perturbation expansion on it. Setting ε = 0 gives x 1 = 0, 4 Rescaling In this section we ll look at one of the reasons that our ε = 0 system might not have enough solutions, and introduce a tool that is fundamental to all perturbation systems. We ll start with

More information

1.1 Definition of a Limit. 1.2 Computing Basic Limits. 1.3 Continuity. 1.4 Squeeze Theorem

1.1 Definition of a Limit. 1.2 Computing Basic Limits. 1.3 Continuity. 1.4 Squeeze Theorem 1. Limits 1.1 Definition of a Limit 1.2 Computing Basic Limits 1.3 Continuity 1.4 Squeeze Theorem 1.1 Definition of a Limit The limit is the central object of calculus. It is a tool from which other fundamental

More information

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES J. WONG (FALL 2017) What did we cover this week? Basic definitions: DEs, linear operators, homogeneous (linear) ODEs. Solution techniques for some classes

More information

CSCI-6971 Lecture Notes: Monte Carlo integration

CSCI-6971 Lecture Notes: Monte Carlo integration CSCI-6971 Lecture otes: Monte Carlo integration Kristopher R. Beevers Department of Computer Science Rensselaer Polytechnic Institute beevek@cs.rpi.edu February 21, 2006 1 Overview Consider the following

More information

MA 123 September 8, 2016

MA 123 September 8, 2016 Instantaneous velocity and its Today we first revisit the notion of instantaneous velocity, and then we discuss how we use its to compute it. Learning Catalytics session: We start with a question about

More information

Georgia Department of Education Common Core Georgia Performance Standards Framework CCGPS Advanced Algebra Unit 2

Georgia Department of Education Common Core Georgia Performance Standards Framework CCGPS Advanced Algebra Unit 2 Polynomials Patterns Task 1. To get an idea of what polynomial functions look like, we can graph the first through fifth degree polynomials with leading coefficients of 1. For each polynomial function,

More information

Solutions to Problem Sheet for Week 11

Solutions to Problem Sheet for Week 11 THE UNIVERSITY OF SYDNEY SCHOOL OF MATHEMATICS AND STATISTICS Solutions to Problem Sheet for Week MATH9: Differential Calculus (Advanced) Semester, 7 Web Page: sydney.edu.au/science/maths/u/ug/jm/math9/

More information

Solutions to Homework 11

Solutions to Homework 11 Solutions to Homework 11 Read the statement of Proposition 5.4 of Chapter 3, Section 5. Write a summary of the proof. Comment on the following details: Does the proof work if g is piecewise C 1? Or did

More information

Math 221 Notes on Rolle s Theorem, The Mean Value Theorem, l Hôpital s rule, and the Taylor-Maclaurin formula. 1. Two theorems

Math 221 Notes on Rolle s Theorem, The Mean Value Theorem, l Hôpital s rule, and the Taylor-Maclaurin formula. 1. Two theorems Math 221 Notes on Rolle s Theorem, The Mean Value Theorem, l Hôpital s rule, and the Taylor-Maclaurin formula 1. Two theorems Rolle s Theorem. If a function y = f(x) is differentiable for a x b and if

More information

Π xdx cos 2 x

Π xdx cos 2 x Π 5 3 xdx 5 4 6 3 8 cos x Help Your Child with Higher Maths Introduction We ve designed this booklet so that you can use it with your child throughout the session, as he/she moves through the Higher course,

More information

Calculus II Practice Test 1 Problems: , 6.5, Page 1 of 10

Calculus II Practice Test 1 Problems: , 6.5, Page 1 of 10 Calculus II Practice Test Problems: 6.-6.3, 6.5, 7.-7.3 Page of This is in no way an inclusive set of problems there can be other types of problems on the actual test. To prepare for the test: review homework,

More information

MATH 1902: Mathematics for the Physical Sciences I

MATH 1902: Mathematics for the Physical Sciences I MATH 1902: Mathematics for the Physical Sciences I Dr Dana Mackey School of Mathematical Sciences Room A305 A Email: Dana.Mackey@dit.ie Dana Mackey (DIT) MATH 1902 1 / 46 Module content/assessment Functions

More information

Statistical Computing: Exam 1 Chapters 1, 3, 5

Statistical Computing: Exam 1 Chapters 1, 3, 5 Statistical Computing: Exam Chapters, 3, 5 Instructions: Read each question carefully before determining the best answer. Show all work; supporting computer code and output must be attached to the question

More information

7. Let X be a (general, abstract) metric space which is sequentially compact. Prove X must be complete.

7. Let X be a (general, abstract) metric space which is sequentially compact. Prove X must be complete. Math 411 problems The following are some practice problems for Math 411. Many are meant to challenge rather that be solved right away. Some could be discussed in class, and some are similar to hard exam

More information

MATH 250 TOPIC 13 INTEGRATION. 13B. Constant, Sum, and Difference Rules

MATH 250 TOPIC 13 INTEGRATION. 13B. Constant, Sum, and Difference Rules Math 5 Integration Topic 3 Page MATH 5 TOPIC 3 INTEGRATION 3A. Integration of Common Functions Practice Problems 3B. Constant, Sum, and Difference Rules Practice Problems 3C. Substitution Practice Problems

More information

INFINITE SEQUENCES AND SERIES

INFINITE SEQUENCES AND SERIES 11 INFINITE SEQUENCES AND SERIES INFINITE SEQUENCES AND SERIES In section 11.9, we were able to find power series representations for a certain restricted class of functions. INFINITE SEQUENCES AND SERIES

More information

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations An Overly Simplified and Brief Review of Differential Equation Solution Methods We will be dealing with initial or boundary value problems. A typical initial value problem has the form y y 0 y(0) 1 A typical

More information

Hermite Interpolation

Hermite Interpolation Jim Lambers MAT 77 Fall Semester 010-11 Lecture Notes These notes correspond to Sections 4 and 5 in the text Hermite Interpolation Suppose that the interpolation points are perturbed so that two neighboring

More information

Note: Final Exam is at 10:45 on Tuesday, 5/3/11 (This is the Final Exam time reserved for our labs). From Practice Test I

Note: Final Exam is at 10:45 on Tuesday, 5/3/11 (This is the Final Exam time reserved for our labs). From Practice Test I MA Practice Final Answers in Red 4/8/ and 4/9/ Name Note: Final Exam is at :45 on Tuesday, 5// (This is the Final Exam time reserved for our labs). From Practice Test I Consider the integral 5 x dx. Sketch

More information

MSM120 1M1 First year mathematics for civil engineers Revision notes 3

MSM120 1M1 First year mathematics for civil engineers Revision notes 3 MSM0 M First year mathematics for civil engineers Revision notes Professor Robert. Wilson utumn 00 Functions Definition of a function: it is a rule which, given a value of the independent variable (often

More information

Outline. Recall... Limits. Problem Solving Sessions. MA211 Lecture 4: Limits and Derivatives Wednesday 17 September Definition (Limit)

Outline. Recall... Limits. Problem Solving Sessions. MA211 Lecture 4: Limits and Derivatives Wednesday 17 September Definition (Limit) Outline MA211 Lecture 4: Limits and Wednesday 17 September 2008 1 0.2 0.15 0.1 2 ) x) 0.05 0 0.05 0.1 3 ) t) 0.15 0.2 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 4 Extra: Binomial Expansions MA211 Lecture 4: Limits

More information

Worksheet Week 1 Review of Chapter 5, from Definition of integral to Substitution method

Worksheet Week 1 Review of Chapter 5, from Definition of integral to Substitution method Worksheet Week Review of Chapter 5, from Definition of integral to Substitution method This worksheet is for improvement of your mathematical writing skill. Writing using correct mathematical expressions

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic - not

More information

Calculus II (Fall 2015) Practice Problems for Exam 1

Calculus II (Fall 2015) Practice Problems for Exam 1 Calculus II (Fall 15) Practice Problems for Exam 1 Note: Section divisions and instructions below are the same as they will be on the exam, so you will have a better idea of what to expect, though I will

More information

Math 107H Fall 2008 Course Log and Cumulative Homework List

Math 107H Fall 2008 Course Log and Cumulative Homework List Date: 8/25 Sections: 5.4 Math 107H Fall 2008 Course Log and Cumulative Homework List Log: Course policies. Review of Intermediate Value Theorem. The Mean Value Theorem for the Definite Integral and the

More information

Graphs of Antiderivatives, Substitution Integrals

Graphs of Antiderivatives, Substitution Integrals Unit #10 : Graphs of Antiderivatives, Substitution Integrals Goals: Relationship between the graph of f(x) and its anti-derivative F (x) The guess-and-check method for anti-differentiation. The substitution

More information

7.1 Coupling from the Past

7.1 Coupling from the Past Georgia Tech Fall 2006 Markov Chain Monte Carlo Methods Lecture 7: September 12, 2006 Coupling from the Past Eric Vigoda 7.1 Coupling from the Past 7.1.1 Introduction We saw in the last lecture how Markov

More information

Review Sheet for Math 5a Final Exam. The Math 5a final exam will be Tuesday, May 1 from 9:15 am 12:15 p.m.

Review Sheet for Math 5a Final Exam. The Math 5a final exam will be Tuesday, May 1 from 9:15 am 12:15 p.m. Review Sheet for Math 5a Final Exam The Math 5a final exam will be Tuesday, May from 9:5 am :5 p.m. Location: Gerstenzang The final exam is cumulative (i.e., it will cover all the material we covered in

More information

The Relation between the Integral and the Derivative Graphs. Unit #10 : Graphs of Antiderivatives, Substitution Integrals

The Relation between the Integral and the Derivative Graphs. Unit #10 : Graphs of Antiderivatives, Substitution Integrals Graphs of Antiderivatives - Unit #0 : Graphs of Antiderivatives, Substitution Integrals Goals: Relationship between the graph of f(x) and its anti-derivative F (x) The guess-and-check method for anti-differentiation.

More information

NOTES ON OCT 4, 2012

NOTES ON OCT 4, 2012 NOTES ON OCT 4, 0 MIKE ZABROCKI I had planned a midterm on Oct I can t be there that day I am canceling my office hours that day and I will be available on Tuesday Oct 9 from 4-pm instead I am tempted

More information

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

2 2xdx. Craigmount High School Mathematics Department

2 2xdx. Craigmount High School Mathematics Department Π 5 3 xdx 5 cosx 4 6 3 8 Help Your Child With Higher Maths Introduction We ve designed this booklet so that you can use it with your child throughout the session, as he/she moves through the Higher course,

More information

EXAM # 3 PLEASE SHOW ALL WORK!

EXAM # 3 PLEASE SHOW ALL WORK! Stat 311, Summer 2018 Name EXAM # 3 PLEASE SHOW ALL WORK! Problem Points Grade 1 30 2 20 3 20 4 30 Total 100 1. A socioeconomic study analyzes two discrete random variables in a certain population of households

More information

Change Of Variable Theorem: Multiple Dimensions

Change Of Variable Theorem: Multiple Dimensions Change Of Variable Theorem: Multiple Dimensions Moulinath Banerjee University of Michigan August 30, 01 Let (X, Y ) be a two-dimensional continuous random vector. Thus P (X = x, Y = y) = 0 for all (x,

More information

Lecture 11: Probability, Order Statistics and Sampling

Lecture 11: Probability, Order Statistics and Sampling 5-75: Graduate Algorithms February, 7 Lecture : Probability, Order tatistics and ampling Lecturer: David Whitmer cribes: Ilai Deutel, C.J. Argue Exponential Distributions Definition.. Given sample space

More information

Calculus (Math 1A) Lecture 5

Calculus (Math 1A) Lecture 5 Calculus (Math 1A) Lecture 5 Vivek Shende September 5, 2017 Hello and welcome to class! Hello and welcome to class! Last time Hello and welcome to class! Last time We discussed composition, inverses, exponentials,

More information

7.1. Calculus of inverse functions. Text Section 7.1 Exercise:

7.1. Calculus of inverse functions. Text Section 7.1 Exercise: Contents 7. Inverse functions 1 7.1. Calculus of inverse functions 2 7.2. Derivatives of exponential function 4 7.3. Logarithmic function 6 7.4. Derivatives of logarithmic functions 7 7.5. Exponential

More information

Math 142 (Summer 2018) Business Calculus 6.1 Notes

Math 142 (Summer 2018) Business Calculus 6.1 Notes Math 142 (Summer 2018) Business Calculus 6.1 Notes Antiderivatives Why? So far in the course we have studied derivatives. Differentiation is the process of going from a function f to its derivative f.

More information

Markov Chain Monte Carlo Lecture 1

Markov Chain Monte Carlo Lecture 1 What are Monte Carlo Methods? The subject of Monte Carlo methods can be viewed as a branch of experimental mathematics in which one uses random numbers to conduct experiments. Typically the experiments

More information

Taylor and Maclaurin Series

Taylor and Maclaurin Series Taylor and Maclaurin Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Background We have seen that some power series converge. When they do, we can think of them as

More information

2.2 Separable Equations

2.2 Separable Equations 2.2 Separable Equations Definition A first-order differential equation that can be written in the form Is said to be separable. Note: the variables of a separable equation can be written as Examples Solve

More information

STEP Support Programme. Pure STEP 1 Questions

STEP Support Programme. Pure STEP 1 Questions STEP Support Programme Pure STEP 1 Questions 2012 S1 Q4 1 Preparation Find the equation of the tangent to the curve y = x at the point where x = 4. Recall that x means the positive square root. Solve the

More information

Finding Limits Analytically

Finding Limits Analytically Finding Limits Analytically Most of this material is take from APEX Calculus under terms of a Creative Commons License In this handout, we explore analytic techniques to compute its. Suppose that f(x)

More information

Math Exam III - Spring

Math Exam III - Spring Math 3 - Exam III - Spring 8 This exam contains 5 multiple choice questions and hand graded questions. The multiple choice questions are worth 5 points each and the hand graded questions are worth a total

More information

Week 5: Logistic Regression & Neural Networks

Week 5: Logistic Regression & Neural Networks Week 5: Logistic Regression & Neural Networks Instructor: Sergey Levine 1 Summary: Logistic Regression In the previous lecture, we covered logistic regression. To recap, logistic regression models and

More information

Calculus Honors and Introduction to Calculus

Calculus Honors and Introduction to Calculus Calculus Honors and Introduction to Calculus Name: This summer packet is for students entering Calculus Honors or Introduction to Calculus in the Fall of 015. The material represents concepts and skills

More information

Major Ideas in Calc 3 / Exam Review Topics

Major Ideas in Calc 3 / Exam Review Topics Major Ideas in Calc 3 / Exam Review Topics Here are some highlights of the things you should know to succeed in this class. I can not guarantee that this list is exhaustive!!!! Please be sure you are able

More information

MATH 124. Midterm 2 Topics

MATH 124. Midterm 2 Topics MATH 124 Midterm 2 Topics Anything you ve learned in class (from lecture and homework) so far is fair game, but here s a list of some main topics since the first midterm that you should be familiar with:

More information

February 27, 2019 LECTURE 10: VECTOR FIELDS.

February 27, 2019 LECTURE 10: VECTOR FIELDS. February 27, 209 LECTURE 0: VECTOR FIELDS 02 HONORS MULTIVARIABLE CALCULUS PROFESSOR RICHARD BROWN Synopsis Vector fields, as geometric objects and/or functions, provide a backbone in which all of physics

More information

Part 2 Continuous functions and their properties

Part 2 Continuous functions and their properties Part 2 Continuous functions and their properties 2.1 Definition Definition A function f is continuous at a R if, and only if, that is lim f (x) = f (a), x a ε > 0, δ > 0, x, x a < δ f (x) f (a) < ε. Notice

More information

Week 12: Optimisation and Course Review.

Week 12: Optimisation and Course Review. Week 12: Optimisation and Course Review. MA161/MA1161: Semester 1 Calculus. Prof. Götz Pfeiffer School of Mathematics, Statistics and Applied Mathematics NUI Galway November 21-22, 2016 Assignments. Problem

More information

Power series solutions for 2nd order linear ODE s (not necessarily with constant coefficients) a n z n. n=0

Power series solutions for 2nd order linear ODE s (not necessarily with constant coefficients) a n z n. n=0 Lecture 22 Power series solutions for 2nd order linear ODE s (not necessarily with constant coefficients) Recall a few facts about power series: a n z n This series in z is centered at z 0. Here z can

More information

COMP 551 Applied Machine Learning Lecture 3: Linear regression (cont d)

COMP 551 Applied Machine Learning Lecture 3: Linear regression (cont d) COMP 551 Applied Machine Learning Lecture 3: Linear regression (cont d) Instructor: Herke van Hoof (herke.vanhoof@mail.mcgill.ca) Slides mostly by: Class web page: www.cs.mcgill.ca/~hvanho2/comp551 Unless

More information

The AP exams will ask you to find derivatives using the various techniques and rules including

The AP exams will ask you to find derivatives using the various techniques and rules including Student Notes Prep Session Topic: Computing Derivatives It goes without saying that derivatives are an important part of the calculus and you need to be able to compute them. You should know the derivatives

More information

University of Regina. Lecture Notes. Michael Kozdron

University of Regina. Lecture Notes. Michael Kozdron University of Regina Statistics 252 Mathematical Statistics Lecture Notes Winter 2005 Michael Kozdron kozdron@math.uregina.ca www.math.uregina.ca/ kozdron Contents 1 The Basic Idea of Statistics: Estimating

More information

Math 1: Calculus with Algebra Midterm 2 Thursday, October 29. Circle your section number: 1 Freund 2 DeFord

Math 1: Calculus with Algebra Midterm 2 Thursday, October 29. Circle your section number: 1 Freund 2 DeFord Math 1: Calculus with Algebra Midterm 2 Thursday, October 29 Name: Circle your section number: 1 Freund 2 DeFord Please read the following instructions before starting the exam: This exam is closed book,

More information

Higher Mathematics Course Notes

Higher Mathematics Course Notes Higher Mathematics Course Notes Equation of a Line (i) Collinearity: (ii) Gradient: If points are collinear then they lie on the same straight line. i.e. to show that A, B and C are collinear, show that

More information

Stat 451 Lecture Notes Simulating Random Variables

Stat 451 Lecture Notes Simulating Random Variables Stat 451 Lecture Notes 05 12 Simulating Random Variables Ryan Martin UIC www.math.uic.edu/~rgmartin 1 Based on Chapter 6 in Givens & Hoeting, Chapter 22 in Lange, and Chapter 2 in Robert & Casella 2 Updated:

More information

. As x gets really large, the last terms drops off and f(x) ½x

. As x gets really large, the last terms drops off and f(x) ½x Pre-AP Algebra 2 Unit 8 -Lesson 3 End behavior of rational functions Objectives: Students will be able to: Determine end behavior by dividing and seeing what terms drop out as x Know that there will be

More information

SYDE 112, LECTURE 7: Integration by Parts

SYDE 112, LECTURE 7: Integration by Parts SYDE 112, LECTURE 7: Integration by Parts 1 Integration By Parts Consider trying to take the integral of xe x dx. We could try to find a substitution but would quickly grow frustrated there is no substitution

More information

5. Some theorems on continuous functions

5. Some theorems on continuous functions 5. Some theorems on continuous functions The results of section 3 were largely concerned with continuity of functions at a single point (usually called x 0 ). In this section, we present some consequences

More information

4.4 Uniform Convergence of Sequences of Functions and the Derivative

4.4 Uniform Convergence of Sequences of Functions and the Derivative 4.4 Uniform Convergence of Sequences of Functions and the Derivative Say we have a sequence f n (x) of functions defined on some interval, [a, b]. Let s say they converge in some sense to a function f

More information

f(x 0 + h) f(x 0 ) h slope of secant line = m sec

f(x 0 + h) f(x 0 ) h slope of secant line = m sec Derivatives Using limits, we can define the slope of a tangent line to a function. When given a function f(x), and given a point P (x 0, f(x 0 )) on f, if we want to find the slope of the tangent line

More information

Unit II Quiz Question Sampler 2.086/2.090 Fall 2012

Unit II Quiz Question Sampler 2.086/2.090 Fall 2012 Unit II Quiz Question Sampler 2.86/2.9 Fall 212 You may refer to the text and other class materials as well as your own notes and scripts. For Quiz 2 (on Unit II) you will need a calculator (for arithmetic

More information

CALCULUS. Department of Mathematical Sciences Rensselaer Polytechnic Institute. May 8, 2013

CALCULUS. Department of Mathematical Sciences Rensselaer Polytechnic Institute. May 8, 2013 Department of Mathematical Sciences Ready... Set... CALCULUS 3 y 2 1 0 3 2 1 0 1 x 2 3 1 2 3 May 8, 2013 ii iii Ready... Set... Calculus This document was prepared by the faculty of the Department of Mathematical

More information

Math Practice Exam 3 - solutions

Math Practice Exam 3 - solutions Math 181 - Practice Exam 3 - solutions Problem 1 Consider the function h(x) = (9x 2 33x 25)e 3x+1. a) Find h (x). b) Find all values of x where h (x) is zero ( critical values ). c) Using the sign pattern

More information

TAYLOR POLYNOMIALS DARYL DEFORD

TAYLOR POLYNOMIALS DARYL DEFORD TAYLOR POLYNOMIALS DARYL DEFORD 1. Introduction We have seen in class that Taylor polynomials provide us with a valuable tool for approximating many different types of functions. However, in order to really

More information

Math 140A - Fall Final Exam

Math 140A - Fall Final Exam Math 140A - Fall 2014 - Final Exam Problem 1. Let {a n } n 1 be an increasing sequence of real numbers. (i) If {a n } has a bounded subsequence, show that {a n } is itself bounded. (ii) If {a n } has a

More information

8. Limit Laws. lim(f g)(x) = lim f(x) lim g(x), (x) = lim x a f(x) g lim x a g(x)

8. Limit Laws. lim(f g)(x) = lim f(x) lim g(x), (x) = lim x a f(x) g lim x a g(x) 8. Limit Laws 8.1. Basic Limit Laws. If f and g are two functions and we know the it of each of them at a given point a, then we can easily compute the it at a of their sum, difference, product, constant

More information

Machine Learning, Fall 2009: Midterm

Machine Learning, Fall 2009: Midterm 10-601 Machine Learning, Fall 009: Midterm Monday, November nd hours 1. Personal info: Name: Andrew account: E-mail address:. You are permitted two pages of notes and a calculator. Please turn off all

More information

C if U can. Algebra. Name

C if U can. Algebra. Name C if U can Algebra Name.. How will this booklet help you to move from a D to a C grade? The topic of algebra is split into six units substitution, expressions, factorising, equations, trial and improvement

More information

f X, Y (x, y)dx (x), where f(x,y) is the joint pdf of X and Y. (x) dx

f X, Y (x, y)dx (x), where f(x,y) is the joint pdf of X and Y. (x) dx INDEPENDENCE, COVARIANCE AND CORRELATION Independence: Intuitive idea of "Y is independent of X": The distribution of Y doesn't depend on the value of X. In terms of the conditional pdf's: "f(y x doesn't

More information

Sec 4.1 Limits, Informally. When we calculated f (x), we first started with the difference quotient. f(x + h) f(x) h

Sec 4.1 Limits, Informally. When we calculated f (x), we first started with the difference quotient. f(x + h) f(x) h 1 Sec 4.1 Limits, Informally When we calculated f (x), we first started with the difference quotient f(x + h) f(x) h and made h small. In other words, f (x) is the number f(x+h) f(x) approaches as h gets

More information

Menu. Lecture 2: Orders of Growth. Predicting Running Time. Order Notation. Predicting Program Properties

Menu. Lecture 2: Orders of Growth. Predicting Running Time. Order Notation. Predicting Program Properties CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 2: Orders of Growth Menu Predicting program properties Orders of Growth: O, Ω Course Survey

More information

Stochastic Gradient Descent: The Workhorse of Machine Learning. CS6787 Lecture 1 Fall 2017

Stochastic Gradient Descent: The Workhorse of Machine Learning. CS6787 Lecture 1 Fall 2017 Stochastic Gradient Descent: The Workhorse of Machine Learning CS6787 Lecture 1 Fall 2017 Fundamentals of Machine Learning? Machine Learning in Practice this course What s missing in the basic stuff? Efficiency!

More information

Final Exam. Math 3 Daugherty March 13, 2012

Final Exam. Math 3 Daugherty March 13, 2012 Final Exam Math 3 Daugherty March 3, 22 Name (Print): Last First On this, the Final Math 3 exams in Winter 22, I will work individually, neither giving nor receiving help, guided by the Dartmouth Academic

More information

DRAFT - Math 101 Lecture Note - Dr. Said Algarni

DRAFT - Math 101 Lecture Note - Dr. Said Algarni 3 Differentiation Rules 3.1 The Derivative of Polynomial and Exponential Functions In this section we learn how to differentiate constant functions, power functions, polynomials, and exponential functions.

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 1940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic -

More information

DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES.

DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES. DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES. ANDREW SALCH. PDEs and ODEs, order, and linearity. Differential equations come in so many different

More information

Math 3215 Intro. Probability & Statistics Summer 14. Homework 5: Due 7/3/14

Math 3215 Intro. Probability & Statistics Summer 14. Homework 5: Due 7/3/14 Math 325 Intro. Probability & Statistics Summer Homework 5: Due 7/3/. Let X and Y be continuous random variables with joint/marginal p.d.f. s f(x, y) 2, x y, f (x) 2( x), x, f 2 (y) 2y, y. Find the conditional

More information

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k.

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k. Problem du jour Week 6: Monday, Mar 7 Show that for any initial guess x 0 > 0, Newton iteration on f(x) = x 2 a produces a decreasing sequence x 1 x 2... x n a. What is the rate of convergence if a = 0?

More information

Calculus. Weijiu Liu. Department of Mathematics University of Central Arkansas 201 Donaghey Avenue, Conway, AR 72035, USA

Calculus. Weijiu Liu. Department of Mathematics University of Central Arkansas 201 Donaghey Avenue, Conway, AR 72035, USA Calculus Weijiu Liu Department of Mathematics University of Central Arkansas 201 Donaghey Avenue, Conway, AR 72035, USA 1 Opening Welcome to your Calculus I class! My name is Weijiu Liu. I will guide you

More information