Info 2950, Lecture 7

Similar documents
1 INFO Sep 05

2.6 Logarithmic Functions. Inverse Functions. Question: What is the relationship between f(x) = x 2 and g(x) = x?

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27

First and Last Name: 2. Correct The Mistake Determine whether these equations are false, and if so write the correct answer.

Independent Study Project: Chapter 4 Exponential and Logarithmic Functions

AdvAlg9.7LogarithmsToBasesOtherThan10.notebook. March 08, 2018

Solutions to Problems and

Section Taylor and Maclaurin Series

Example. Determine the inverse of the given function (if it exists). f(x) = 3

Linear Variable coefficient equations (Sect. 2.1) Review: Linear constant coefficient equations

4.1 Exponential Functions

PAS04 - Important discrete and continuous distributions

plim W 0 " 1 N = 0 Prof. N. M. Kiefer, Econ 620, Cornell University, Lecture 16.

Continuous-time Markov Chains

Logarithms. Professor Richard Blecksmith Dept. of Mathematical Sciences Northern Illinois University

Lecture 2: Discrete Probability Distributions

Taylor and Maclaurin Series

Math M110: Lecture Notes For Chapter 12 Section 12.1: Inverse and Composite Functions

MTH MTH Lecture 6. Yevgeniy Kovchegov Oregon State University

Sampling Distributions

Exponential and Logarithmic Functions

Objectives. Use the number e to write and graph exponential functions representing realworld

TA Qinru Shi: Based on poll result, the first Programming Boot Camp will be: this Sunday 5 Feb, 7-8pm Gates 114.

Lecture 32: Taylor Series and McLaurin series We saw last day that some functions are equal to a power series on part of their domain.

Solution: f( 1) = 3 1)

Be sure this exam has 8 pages including the cover The University of British Columbia MATH 103 Midterm Exam II Mar 14, 2012

Section 5.1 Determine if a function is a polynomial function. State the degree of a polynomial function.

Lesson 12.7: Sequences and Series

SUMMATION TECHNIQUES

Replacing the a in the definition of the derivative of the function f at a with a variable x, gives the derivative function f (x).

MAC Module 8 Exponential and Logarithmic Functions I. Rev.S08

MAC Module 8. Exponential and Logarithmic Functions I. Learning Objectives. - Exponential Functions - Logarithmic Functions

The first bound is the strongest, the other two bounds are often easier to state and compute. Proof: Applying Markov's inequality, for any >0 we have

Section 4.2 Logarithmic Functions & Applications

Section Exponential Functions

Discrete Distributions Chapter 6

Statistics 224 Solution key to EXAM 2 FALL 2007 Friday 11/2/07 Professor Michael Iltis (Lecture 2)

Series Solutions of ODEs. Special Functions

nt and A = Pe rt to solve. 3) Find the accumulated value of an investment of $10,000 at 4% compounded semiannually for 5 years.

FINAL EXAM: Monday 8-10am

Math Review for Exam Answer each of the following questions as either True or False. Circle the correct answer.

Exponential and logarithm functions

JUST THE MATHS UNIT NUMBER DIFFERENTIATION APPLICATIONS 5 (Maclaurin s and Taylor s series) A.J.Hobson

Math 180 Chapter 4 Lecture Notes. Professor Miguel Ornelas

3. On the grid below, sketch and label graphs of the following functions: y = sin x, y = cos x, and y = sin(x π/2). π/2 π 3π/2 2π 5π/2

EC5555 Economics Masters Refresher Course in Mathematics September 2013

18.175: Lecture 13 Infinite divisibility and Lévy processes

Exponential and Logarithmic Functions

Probability Distributions Columns (a) through (d)

Taylor series - Solutions

EXAM 3 MAT 167 Calculus I Spring is a composite function of two functions y = e u and u = 4 x + x 2. By the. dy dx = dy du = e u x + 2x.

CHAPTER FIVE. Solutions for Section 5.1. Skill Refresher. Exercises

Data, Estimation and Inference

MATH 111: EXAM 03 BLAKE FARMAN UNIVERSITY OF SOUTH CAROLINA

2 2 + x =

Linear Variable coefficient equations (Sect. 1.2) Review: Linear constant coefficient equations

Chapter 2 - Survival Models

Calculus (Math 1A) Lecture 4

DIFFERENTIATION RULES

ESS 461 Notes and problem set - Week 1 - Radioactivity

Calculus (Math 1A) Lecture 4

SOLUTIONS FOR THE PRACTICE EXAM FOR THE SECOND MIDTERM EXAM

Math 115 First Midterm February 12, 2013

Section 9.2: Matrices.. a m1 a m2 a mn

Section 6.3. x m+1 x m = i n x m, (6.3.1)

Page Max. Possible Points Total 100

CHAPTER 7. Logarithmic Functions

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Moment functions. x r p X (x) (1) E[X r ] = x r f X (x) dx (2) (x E[X]) r p X (x) (3)

q-series Michael Gri for the partition function, he developed the basic idea of the q-exponential. From

Probability Distributions: Continuous

MAC Learning Objectives. Logarithmic Functions. Module 8 Logarithmic Functions

Sec. 4.2 Logarithmic Functions

Lecture 5 - Logarithms, Slope of a Function, Derivatives

Review of Functions A relation is a function if each input has exactly output. The graph of a function passes the vertical line test.

Week 12: Optimisation and Course Review.

Math 300: Writing in Mathematics. John T. Baldwin. January 21, 2009

2.2 THE DERIVATIVE 2.3 COMPUTATION OF DERIVATIVES: THE POWER RULE 2.4 THE PRODUCT AND QUOTIENT RULES 2.6 DERIVATIVES OF TRIGONOMETRIC FUNCTIONS

1 Functions and Graphs

Relationship between probability set function and random variable - 2 -

Math Analysis - Chapter 5.4, 5.5, 5.6. (due the next day) 5.4 Properties of Logarithms P.413: 7,9,13,15,17,19,21,23,25,27,31,33,37,41,43,45

MULTINOMIAL PROBABILITY DISTRIBUTION

ALL TEXTS BELONG TO OWNERS. Candidate code: glt090 TAKEN FROM

Decision making and problem solving Lecture 1. Review of basic probability Monte Carlo simulation

EXAM 3 Tuesday, March 18, 2003

Economics 620, Lecture 5: exp

Final Exam Study Guide Dynamics of Algebra 2. Chapter Section Example

Bernoulli Trials, Binomial and Cumulative Distributions

Warmup quick expansions

Solutions to Homework 1, Introduction to Differential Equations, 3450: , Dr. Montero, Spring y(x) = ce 2x + e x

44 Wyner PreCalculus Spring 2017

APPM 1235 Exam 2 Spring 2018

Section 6.8 Exponential Models; Newton's Law of Cooling; Logistic Models

The Derivative of a Function Measuring Rates of Change of a function. Secant line. f(x) f(x 0 ) Average rate of change of with respect to over,

171S5.6o Applications and Models: Growth and Decay; and Compound Interest November 21, 2011

CS5314 Randomized Algorithms. Lecture 15: Balls, Bins, Random Graphs (Hashing)

Equations with regular-singular points (Sect. 5.5).

Final Exam Review Part 2

Integral. For example, consider the curve y = f(x) between x = 0 and x = 1, with f(x) = x. We ask:

MAT01A1. Numbers, Inequalities and Absolute Values. (Appendix A)

Numerical Computation for Deep Learning

Transcription:

Info 2950, Lecture 7 16 Feb 2017 Prob Set 2: due Fri night 24 Feb The registrar has designated the final exam date/time for this course as Sun, 21 May 2017, 2:00-4:30pm

Suppose that q = m / 132 prefer 23 Mar. We re random sampling 45 people, each a Bernoulli trial with probability q of success What statistical variation would we expect for N=45? X Estimate q = 36/45 = 4/5, then variance of a trial is (1/5)(4/5), and p V = Nq(1-q) = 45 * (1/5) (4/5) = 36 / 5, so that = V [X] = 2.68 so result for mean Nq is accurate to roughly 36 +/- 2.65, (or as a percentage q =.8 +/-.06 = 80% +/- 6% )

https://xkcd.com/882/ ( p-hacking )

Example: Suppose a software program has a bug that occurs with probability p =1/1000 a) How many times do we need to run the program in order to have a 50% chance of seeing the bug occur? b) What is the probability of seeing the bug if we run the program 1000 times?

Telegraphic review of exponentials and logarithms: Multiplying m factors of x gives x m, which satisfies x m x n = x m+n, (x n ) m = x nm, x 0 =1 Exponential function: f(x) =y x is frequently used with y =e,wheree=2.71828182845905... is a transcendental number The function with base e also has a special name: exp(x) =e x

One definition of e: Invest $1 at a 100%/year interest rate for a year Compound interest once at end of year: $1 (1 + 1) = $2 If compounded twice, 50% after a half year, 50% at the end of the year: $1 (1 + 1/2)(1 + 1/2) = $2.25 Break year into N pieces, compound interest N times: (1 + 1/N ) N In the large N limit (compounded continuously), the result converges to lim (1 + 1/N N!1 )N =e.

Interest rate of 5% per year compounded continuously: lim N!1 (1 +.05/N ) N =lim M!1 (1 + 1/M ).05M =e.05 1.051271096. For general interest rate x, letn = Mx: lim N!1 (1 + x/n ) N =lim M!1 (1 + 1/M ) Mx =e x. e x can also be written as an infinite sum. Expand product, keep only terms that survive large N limit: e x = lim 1+ x N = lim 1+N x N!1 N N!1 N + N(N 1) 2! x N 2 + + N m x N m + =1+x + x2 2! + x3 3! + + xm m! + = 1 X n=0 x n n!

The logarithm function is the inverse of the exponential function: if y x = X then x = log y X For example: 10 3 = 1000 so log 10 1000 = 3 2 10 = 1024 so log 2 1024 = 10 [Note: the rough relation 10 3 2 10 implies that 10 3/10 2 and 2 10/3 10, giving estimates log 10 2 3/10 and log 2 10 10/3 (actual values: 0.30103... and 3.32192...)]

Useful properties of the logarithm function follow directly from corresponding properties x m x n = x m+n, (x n ) m = x nm, x 0 =1of the exponential function: log XZ = log X + log Z, log X s = s log X, log 1 = 0 (For example if X = y x and Z = y z, then log y XZ = log y y x y z = log y y x+z = x + z = log y X + log y Z and log X s = log y y xs = xs = s log y X

Logarithms to di erent bases y, z are simply related by a numerical factor log z y: log y x = log z x log z y (following from log z x = log z y log y x = log y x log z y). The special notation ln = log e is used for logarithms to the base e: for example: ln 2 = log e 2.693. For the leading behavior, recall e t 1 t for small t, soln(1 t) t

The series expansion for the function ln(1 + t) =a 1 t + a 2 t 2 + a 3 t 3 + can be determined by setting e x =1+t (defined so that t is small when x is small) and substituting in e x = P 1 n=0 xn n! : 1+t =1+(a 1 t+a 2 t 2 +a 3 t 3 + )+ 1 2 (a 1t+a 2 t 2 +a 3 t 3 + ) 2 + 1 3! (a 1t+a 2 t 2 +a 3 t 3 + ) 3 +. Comparing the coe cients of powers of t gives: a 1 = 1, a 2 + a 2 1/2 = 0, a 3 +2a 1 a 2 /2+a 3 1/6 = 0,... and thus a 2 = 1/2, a 3 =1/2 1/6 =1/3, i.e., ln(1 + t) =t t 2 /2+t 3 /3 Letting t! t, the full result can be written in the form ln(1 t) = t t 2 2 t 3 3 = 1X n=1 t n n

Example: Suppose a software program has a bug that occurs with probability p =1/1000 a) How many times do we need to run the program in order to have a 50% chance of seeing the bug occur? b) What is the probability of seeing the bug if we run the program 1000 times?

Example: Suppose a software program has a bug that occurs with probability p =1/1000. a) probability of not seeing the problem occur in a single run is P 1 =1 p assuming successive runs independent, probability of seeing no problem after N runs is P N =(1 p) N For (1 p) N =1/2, we find N ln(1 p) =ln(1/2) Plug into calculator, or use ln(1 p) p for small p: Np ln 2, so N (1/p) ln 2 = 1000 ln 2 693 so after N = 693 trials the probability of no problem falls to roughly 50%.

Example: Suppose a software program has a bug that occurs with probability p =1/1000 b) probability of not seeing bug in 1000 runs is P 1000 =(1 1 1000 )1000 1000 is large so this is approximated by P 1000 e 1.368 [Equivalently, using log(1 t) t, we can estimate ln P 1000 = 1000 ln(1 1 1000 ) 1000( 1 1000 )= 1, so again P 1000 e 1 ] The probability of seeing the bug is therefore 1 P 1000.632, i.e., has climbed to roughly 63.2% after 1000 trials. [Note that this also the probability that someone in a group of 365 other people has a birthday coincident with yours: (1 1 365 )365 e 1 is no coincidence, so also 1 1/e.632]

plt.figure(figsize(8,6)) N=arange(5001.) (5000,.993) plt.plot(1-exp(-n/1000),'r') points = array([693,1000,5000]) plt.plot(points,1-exp(-points/1000.),'o') plt.xticks(range(0,5001,500)) plt.yticks(arange(.1,1.1,.1)) (1000,.632) plt.grid('on') plt.savefig('eprob.pdf') (693,.5) probability of seeing a problem, given by 1 (999/1000) N 1 e N/1000.

This problem of the probability of seeing some event in N trials is directly analogous to the problem of nuclear decay, where p is instead the probability per unit time of decay of some nuclear species. (In the original problem, p was a probability per trial, so a trial becomes an infinitesimal time step in the nuclear problem.) The half-life, i.e., the time for half of some sample to be likely to decay, is given by the equivalent formula t 1/2 =(1/p)ln2, and the fraction remaining (not subject to the event ) at time t is given by e pt =e ln 2(t/t 1/2)