2.4. The 95% interval of Gamma(2,1) (Optional question) Jungho Ryu.

Slides:



Advertisements
Similar presentations
How To Multiply Fractions
Advertisements

Introductory Circuit Analysis Robert L. Boylestad
Numerical Solutions of Differential Equations Euler’s Method.
Describing Motion with Equations There are a variety of quantities associated with the motion of objects – displacement (and distance), velocity (and speed),
Geometry Learning the Names and Characteristics of Shapes
McGraw-Hill Ryerson Copyright © 2011 McGraw-Hill Ryerson Limited. Adapted by Peter Au, George Brown College.
Fractions.
Chapter 9: The Normal Distribution
HOW DO YOU GET THOSE LOVELY CURVES? Unfortunately the only curves we can draw (so far, you’ll learn more later) are graphs of functions Today, with any.
Decision Trees (2). Numerical attributes Tests in nodes are of the form f i > constant.
1 Validation and Verification of Simulation Models.
Basic Statistical Concepts Part II Psych 231: Research Methods in Psychology.
APPLICATIONS OF DIFFERENTIATION 4. In Sections 2.2 and 2.4, we investigated infinite limits and vertical asymptotes.  There, we let x approach a number.
Choose the right picture
CSCI 347 / CS 4206: Data Mining Module 04: Algorithms Topic 06: Regression.
Seventh Grade Math Math 3.
Unit 3: Solving Equations Minds On. Unit 3: Solving Equations Solving Polynomial Equations Success Criteria for Solving Polynomial Equations:  Isolate.
Solving Equations Grade 5 Math.
Introduction While it may not be efficient to write out the justification for each step when solving equations, it is important to remember that the properties.
Central Tendency In general terms, central tendency is a statistical measure that determines a single value that accurately describes the center of the.
Statistical Methods For Engineers ChE 477 (UO Lab) Larry Baxter & Stan Harding Brigham Young University.
Accelerated Motion Chapter 3.1 Page 57.  The most important thing to notice in motion diagrams is the distance between successive positions!  If the.
1 Essential Question: Explain the goal of checking “Productivity;” define input and output; list and describe fixed costs, variable costs, and marginal.
Traditional Method 1 mean, sigma unknown. In a national phone survey conducted in May 2012, adults were asked: Thinking about social issues, would you.
Chapter 3: Central Tendency. Central Tendency In general terms, central tendency is a statistical measure that determines a single value that accurately.
880.P20 Winter 2006 Richard Kass 1 Confidence Intervals and Upper Limits Confidence intervals (CI) are related to confidence limits (CL). To calculate.
Three simple methods for solving quadratic equations
1 CSI5388: Functional Elements of Statistics for Machine Learning Part I.
Physics 114: Lecture 10 PDFs Part Deux Dale E. Gary NJIT Physics Department.
Introduction This chapter gives you several methods which can be used to solve complicated equations to given levels of accuracy These are similar to.
Chapter 9 – 1 Chapter 6: The Normal Distribution Properties of the Normal Distribution Shapes of Normal Distributions Standard (Z) Scores The Standard.
Test Topics 1)Notation and symbols 2)Determining if CLT applies. 3)Using CLT to find mean/mean proportion and standard error of sampling distribution 4)Finding.
Education Research 250:205 Writing Chapter 3. Objectives Subjects Instrumentation Procedures Experimental Design Statistical Analysis  Displaying data.
Comparing two sample means Dr David Field. Comparing two samples Researchers often begin with a hypothesis that two sample means will be different from.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Introduction to Pharmaceutical Calculation
Module 1: Statistical Issues in Micro simulation Paul Sousa.
Additional Problems.
I have learned a lot of math units mostly which are fractions, mixed numbers, and geometry. I thought by far Geometry was the most difficult units with.
INVESTIGATION 1.
Complex Numbers MATH 017 Intermediate Algebra S. Rook.
Subtraction Strategies. draw a picture = Step 1, draw 85. Step 2, mark off 12. Step 3, what is left? = 73.
Estimation of a Population Mean
Ex St 801 Statistical Methods Inference about a Single Population Mean.
More on Correctness. Prime Factorization Problem: Write a program that computes all the prime factors of a given number Solution (Idea): Factors are less.
Algebra Properties Definition Numeric Example  Algebraic Example.
Today: Standard Deviations & Z-Scores Any questions from last time?
CHAPTER 2.3 PROBABILITY DISTRIBUTIONS. 2.3 GAUSSIAN OR NORMAL ERROR DISTRIBUTION  The Gaussian distribution is an approximation to the binomial distribution.
ERT 207 Analytical Chemistry ERT 207 ANALYTICAL CHEMISTRY Dr. Saleha Shamsudin.
Ch 2 Quarter TEST Review RELATION A correspondence between 2 sets …say you have a set x and a set y, then… x corresponds to y y depends on x x is the.
+ Unit 6: Comparing Two Populations or Groups Section 10.2 Comparing Two Means.
Chapter 7: Sampling Distributions Section 7.2 Sample Proportions.
21-1 The Costs of Production  Before anyone can consume to satisfy wants and needs, goods and services must be produced.  Producers are profit-seeking,
CHAPTER 11 Mean and Standard Deviation. BOX AND WHISKER PLOTS  Worksheet on Interpreting and making a box and whisker plot in the calculator.
Solving Equations with Addition or Subtraction Medina1.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Solving Addition and Subtraction Equations An equation is a mathematical sentence that contains an equal sign.
Area The amount of space inside the boundary of a two- dimensional shape. Perimeter The distance around a two- dimensional shape.
Triangle Inequality Theorem The sum of the lengths of any two sides of a triangle is greater than the length of the third side.
Chapter 2 Summarizing and Graphing Data
CHAPTER 9 Testing a Claim
Describing Motion with Equations
Triangle Inequalities
Five Number Summary and Box Plots
Designing Algorithms for Multiplication of Fractions
Week 14 – Information System Development
Equations and Inequalities
Solving Equations Grade 5 Math.
The Fundamental Theorem of Calculus
Five Number Summary and Box Plots
Presentation transcript:

2.4. The 95% interval of Gamma(2,1) (Optional question) Jungho Ryu

The situation We need to find the 95% confidence interval of Gamma distribution f(x) with one of these conditions satisfied: 1.Choose two points x0 and x1 with x0 < x1 such that I.f(x0) = f(x1) II.For all (x’ x1), f(x’) < f(x0). 2.(equivalently) Choose two points x0 and x1 with x0 < x1 such that I.f(x0) = f(x1) II.For all possible x0’ and x1’ with x0’ x1 – x0.

The situation We need to find the 95% confidence interval of Gamma distribution f(x) with one of these conditions satisfied: 1.Choose two points x0 and x1 with x0 < x1 such that I.f(x0) = f(x1) II.For all (x’ x1), f(x’) < f(x0). 2.(equivalently) Choose two points x0 and x1 with x0 < x1 such that I.f(x0) = f(x1) II.For all possible x0’ and x1’ with x0’ x1 – x0.

Pictorically Speaking Case 1: all points not belonging to the interval have lower f(x) biggest f(x) are in the 95% interval All x’s that belong to 95% interval f(x0)f(x1)

Conceptually Speaking Notice that x0 and x1 are on the opposite side of the peak (global maximum) – So we need to find the global maximum To always include only the biggest f(x)’s, we can start x0 and x1 from the top and go down – while f(x0) and f(x1) keeping the same! But the sides look different (function is not symmetrical!)

Into action! First we need to find that global maximum (easy!: Find it analytically). Gamma Distribution (scale = 2, shape = 1) f(x) = x e -x. We take the derivative and set it to 0. f’(x) = e –x – xe -x = 0  e –x = xe -x  x = 1 The global maximum is at x =1. So, x0 1.

Ideally, We would update (decrease) x0 and then find the inverse f -1 to get x1. – Not doable analytically. Then we do it numerically: – Update (decrease) x0  calculate f(x0)  slowly update (increase) x1 so that f(x1) ≈ f(x0) Actually, f(x1) + ɛ = f(x0) We lead with x0 and update with x1 because f(x1) decreases slower (therefore more accurate).

Describe the Update in Picture Start with x0 and x1 close to 1. Possible 95% interval candidate f(x0)f(x1) 1

Describe the Update in Picture Move the x0 to a new position Possible 95% interval candidate f(x0) f(x1) 1 1.Lower x0  lower f(x0)

Describe the Update in Picture Increase x1 little by little biggest f(x) only Possible 95% interval candidate f(x0) f(x1) 2 1.Lower x0  lower f(x0) 2.Increase x1 slowly so that f(x1) ≈ f(x0)

Describe the Update in Picture f(x1) ≈ f(x0) biggest f(x) only Possible 95% interval candidate f(x0) f(x1) 1.Lower x0  lower f(x0) 2.Increase x1 slowly so that f(x1) ≈ f(x0)

Describe the Update in Picture Check to see the interval represents 95% Possible 95% interval candidate f(x0) f(x1) 1.Lower x0  lower f(x0) 2.Increase x1 slowly so that f(x1) ≈ f(x0) 3.Check whether the interval F(x1)-F(x0) is big enough. 3

Describe the Update in Picture All together biggest f(x) only Possible 95% interval candidate (check) f(x0) f(x1) Lower x0  lower f(x0) 2.Increase x1 slowly so that f(x1) ≈ f(x0) 3.Check whether the interval F(x1)-F(x0) is big enough.

the Algorithm To start the algorithm:  f(x0) > f(x1)  F(x1) – F(x0) <  Iterates by:  Update x0, and then update x1.  Check for F(x1) – F(x0) >  Print result of each iteration  Algorithm Ends when:  F(x1) – F(x0) ≈ 0.95 (actually F(x1) – F(x0)= ɛ’)

Setting up BEFORE the algorithm Positions of f(x0) and f(x1) Definitely smaller than 95% f(x0) f(x1) f(x0) < 1 < f(x1) f(x0) < f(x1) F(x1) – F(x0) < 0.95

Our Algorithm Conceptually Initiate x0 = 0.7, x1 = 1.3 ( f(x0) = and f(x1) = F(x1) – F(x0) = ) while (F(x1) – F(x0) < 0.95)

Our Algorithm Conceptually Initiate x0 = 0.7; x1 = 1.3; define f(x) while (F(x1) – F(x0) < 0.95) x0 = x while ( f(x1) – f(x0) > 0) x1 = x (UPDATE)

Our Algorithm Conceptually Initiate x0 = 0.7; x1 = 1.3; define f(x) while (F(x1) – F(x0) < 0.95) interval = F(x1) – F(x0) print x0, x1, f(x0), f(x1), interval x0 = x while ( f(x1) – f(x0) > 0) x1 = x (UPDATE)

Everything Correct (Final) x0 = 0.7; x1 = 1.3; f = function(x){p = x*exp(-x) return(p)} while (pgamma(x1, shape =2) – pgamma(x0, shape=2) < 0.95){ x0 = x0 – while (f(x1) – f(x0) > 0){ x1 = x } interval = pgamma(x1, shape =2) – pgamma(x0, shape=2) print(c(x0, x1, f(x0), f(x1), interval))}

The Output … x0, x1, f(x0), f(x1), interval

Optional: Improving the algorithm We saw epilson ɛ twice. This implies that the algorithm is biased! The algorithm will always have the right point a little too far out and the interval slightly too big!

Ideally, We would update (decrease) x0 and then find the inverse f -1 to get x1. – Not doable analytically. Then we do it numerically: – Update (decrease) x0  calculate f(x0)  slowly update (increase) x1 so that f(x1) ≈ f(x0) Actually, f(x1) + ɛ = f(x0) We lead with x0 and update with x1 because f(x1) decreases slower (therefore more accurate).

the Algorithm To start the algorithm:  f(x0) > f(x1)  F(x1) – F(x0) <  Iterates by:  Update x0, and then update x1.  Check for F(x1) – F(x0) >  Print result of each iteration  Algorithm Ends when:  F(x1) – F(x0) ≈ 0.95 (actually F(x1) – F(x0)= ɛ’)

Correcting Bias We can correct the bias by adding or subtracting a small amount to negate ɛ. How much? Look at the output and take the average Where? Right after the updates are done BUT ON NEXT TIME!