SYSM 6304 Risk and Decision Analysis Lecture 2: Fitting Distributions to Data

Similar documents
Quantitative Introduction ro Risk and Uncertainty in Business Module 5: Hypothesis Testing Examples

Chapter 4 Continuous Random Variables and Probability Distributions

Lecture 23. STAT 225 Introduction to Probability Models April 4, Whitney Huang Purdue University. Normal approximation to Binomial

Chapter 4 Continuous Random Variables and Probability Distributions

Continuous Distributions

Business Statistics 41000: Probability 3

Two hours. To be supplied by the Examinations Office: Mathematical Formula Tables and Statistical Tables THE UNIVERSITY OF MANCHESTER

continuous rv Note for a legitimate pdf, we have f (x) 0 and f (x)dx = 1. For a continuous rv, P(X = c) = c f (x)dx = 0, hence

Normal Distribution. Notes. Normal Distribution. Standard Normal. Sums of Normal Random Variables. Normal. approximation of Binomial.

Random Variables and Probability Distributions

What was in the last lecture?

Normal distribution Approximating binomial distribution by normal 2.10 Central Limit Theorem

SYSM 6304: Risk and Decision Analysis Lecture 6: Pricing and Hedging Financial Derivatives

8.1 Estimation of the Mean and Proportion

Homework: Due Wed, Feb 20 th. Chapter 8, # 60a + 62a (count together as 1), 74, 82

The Weibull in R is actually parameterized a fair bit differently from the book. In R, the density for x > 0 is

Interval estimation. September 29, Outline Basic ideas Sampling variation and CLT Interval estimation using X More general problems

Discrete Random Variables

4.3 Normal distribution

Chapter 8 Statistical Intervals for a Single Sample

ME3620. Theory of Engineering Experimentation. Spring Chapter III. Random Variables and Probability Distributions.

A useful modeling tricks.

Lecture Stat 302 Introduction to Probability - Slides 15

CS340 Machine learning Bayesian model selection

Homework: Due Wed, Nov 3 rd Chapter 8, # 48a, 55c and 56 (count as 1), 67a

Financial Time Series and Their Characteristics

The Normal Distribution

Data Analysis and Statistical Methods Statistics 651

Statistics 511 Supplemental Materials

Likelihood Methods of Inference. Toss coin 6 times and get Heads twice.

UQ, STAT2201, 2017, Lectures 3 and 4 Unit 3 Probability Distributions.

Introduction to Computational Finance and Financial Econometrics Descriptive Statistics

Chapter 4: Commonly Used Distributions. Statistics for Engineers and Scientists Fourth Edition William Navidi

Gamma Distribution Fitting

Chapter ! Bell Shaped

Managing Systematic Mortality Risk in Life Annuities: An Application of Longevity Derivatives

Chapter 3 Common Families of Distributions. Definition 3.4.1: A family of pmfs or pdfs is called exponential family if it can be expressed as

Statistics 511 Additional Materials

Data Analysis and Statistical Methods Statistics 651

Section 7.5 The Normal Distribution. Section 7.6 Application of the Normal Distribution

Lecture 3: Probability Distributions (cont d)

Commonly Used Distributions

Statistical Intervals. Chapter 7 Stat 4570/5570 Material from Devore s book (Ed 8), and Cengage

Frequency Distribution Models 1- Probability Density Function (PDF)

Characterization of the Optimum

**BEGINNING OF EXAMINATION** A random sample of five observations from a population is:

CS 237: Probability in Computing

Basic notions of probability theory: continuous probability distributions. Piero Baraldi

Basic Procedure for Histograms

The Normal Distribution. (Ch 4.3)

Statistics 431 Spring 2007 P. Shaman. Preliminaries

Some Characteristics of Data

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION

An Information Based Methodology for the Change Point Problem Under the Non-central Skew t Distribution with Applications.

MVE051/MSG Lecture 7

Definition 9.1 A point estimate is any function T (X 1,..., X n ) of a random sample. We often write an estimator of the parameter θ as ˆθ.

Lecture 5 - Continuous Distributions

Much of what appears here comes from ideas presented in the book:

Chapter 7 1. Random Variables

The Normal Distribution

Lecture 5: Fundamentals of Statistical Analysis and Distributions Derived from Normal Distributions

ECON 214 Elements of Statistics for Economists 2016/2017

Biostatistics and Design of Experiments Prof. Mukesh Doble Department of Biotechnology Indian Institute of Technology, Madras

Homework Problems Stat 479

INSTITUTE AND FACULTY OF ACTUARIES. Curriculum 2019 SPECIMEN EXAMINATION

Unit2: Probabilityanddistributions. 3. Normal distribution

Random variables The binomial distribution The normal distribution Other distributions. Distributions. Patrick Breheny.

Data Analysis and Statistical Methods Statistics 651

INSTITUTE OF ACTUARIES OF INDIA EXAMINATIONS. 20 th May Subject CT3 Probability & Mathematical Statistics

MAS1403. Quantitative Methods for Business Management. Semester 1, Module leader: Dr. David Walshaw

Week 2 Quantitative Analysis of Financial Markets Hypothesis Testing and Confidence Intervals

CS 361: Probability & Statistics

Basic Data Analysis. Stephen Turnbull Business Administration and Public Policy Lecture 4: May 2, Abstract

Normal Distribution. Definition A continuous rv X is said to have a normal distribution with. the pdf of X is

Linda Allen, Jacob Boudoukh and Anthony Saunders, Understanding Market, Credit and Operational Risk: The Value at Risk Approach

Econometric Methods for Valuation Analysis

Statistical Intervals (One sample) (Chs )

Value at Risk with Stable Distributions

Lecture 12. Some Useful Continuous Distributions. The most important continuous probability distribution in entire field of statistics.

An Insight Into Heavy-Tailed Distribution

ECON Introductory Econometrics. Lecture 1: Introduction and Review of Statistics

Review of commonly missed questions on the online quiz. Lecture 7: Random variables] Expected value and standard deviation. Let s bet...

STAT:2010 Statistical Methods and Computing. Using density curves to describe the distribution of values of a quantitative

THE UNIVERSITY OF TEXAS AT AUSTIN Department of Information, Risk, and Operations Management

Introduction to Business Statistics QM 120 Chapter 6

A potentially useful approach to model nonlinearities in time series is to assume different behavior (structural break) in different subsamples

Multivariate Cox PH model with log-skew-normal frailties

Limit Theorems for the Empirical Distribution Function of Scaled Increments of Itô Semimartingales at high frequencies

Simulation Lecture Notes and the Gentle Lentil Case

Introduction to Probability and Inference HSSP Summer 2017, Instructor: Alexandra Ding July 19, 2017

Point Estimation. Stat 4570/5570 Material from Devore s book (Ed 8), and Cengage

Continuous random variables

6. Continous Distributions

Financial Econometrics (FinMetrics04) Time-series Statistics Concepts Exploratory Data Analysis Testing for Normality Empirical VaR

Improved Inference for Signal Discovery Under Exceptionally Low False Positive Error Rates

Statistics for Business and Economics

Lecture Note of Bus 41202, Spring 2008: More Volatility Models. Mr. Ruey Tsay

Statistical Tables Compiled by Alan J. Terry

The Bernoulli distribution

Random variables The binomial distribution The normal distribution Sampling distributions. Distributions. Patrick Breheny.

Transcription:

SYSM 6304 Risk and Decision Analysis Lecture 2: Fitting Distributions to Data M. Vidyasagar Cecil & Ida Green Chair The University of Texas at Dallas Email: M.Vidyasagar@utdallas.edu September 5, 2015

Objectives of Lecture Introduce maximum likelihood estimation (MLE) Introduce goodness of fit tests Illustrate the use of empirical and fitted distributions in forecasting percentiles

Outline Case Study: Gaussian Fit of Height Data 1 Case Study: Gaussian Fit of Height Data 2 3

Outline Case Study: Gaussian Fit of Height Data 1 Case Study: Gaussian Fit of Height Data 2 3

Problem Statement Suppose you are given height data for 200 individuals, sampled from a much larger population of millions. You wish to use this data to predict several parameters: What is the average height of the entire population? What is the 99-th percentile and the 99.99-th percentile of the height in the population? By using this case study, we can illustrate various concepts.

Cumulative Distribution Function: Reprise If X is a real-valued random variable, then its cumulative distribution function (CDF) is defined as Φ X (a) := Pr{X a}. In words, Φ X (a) is the probability that X is less than or equal to a. Usually it is unknown and has to be estimated from samples; how can we do this?

Empirical Distribution Function: Definition Suppose Y is the random variable of interest, and we have n independent samples of Y, call them y 1,..., y n. For each value of y, define the empirical distribution function ˆΦ Y (y) = 1 n n i=1 I yi y, where I denotes the indicator function it equals one if the statement in the subscript is true, and zero if it is false. So specifically ˆΦ Y (y) is just the fraction of the n samples that are smaller than or equal to y.

Empirical Distribution Function (Cont d) To construct the empirical distribution function, first sort all the samples y 1,..., y n in increasing order; call the result z 1,..., z n. Then construct a staircase function that jumps by 1/n at each sample z i. That is the empirical distribution function.

Empirical Distribution: Depiction ˆΦ Y (u) z 1 z 2 z 3 z 4 z 5 z 6 u

Empirical Distribution to Approximate True CDF The empirical distribution function is not continuous it jumps vertically by 1/n at each sample, where n is the total number of samples. However, as n becomes large, the jumps become smaller.

Gaussian Density and Distribution Functions: Reprise The normal distribution function is smooth (i.e., differentiable everywhere). The formula for the normal density function is φ N (x) = 1 2π exp( x 2 /2). It is a special case of the Gaussian density function φ G (x) = 1 2πσ exp( (x µ) 2 /2σ 2 ), where µ and σ are the mean and the standard deviation respectively. The next slide shows the density function with µ = 0 for various values of σ.

Gaussian Density Function 0.8 0.7 0.6 Gaussian Density Functions for Various Sigma Values sigma = 1 sigma = 0.5 sigma = 2 sigma = 4 0.5 phi(x) 0.4 0.3 0.2 0.1 0 4 3 2 1 0 1 2 3 4 x

Gaussian Density Function in a Logarithmic Scale The tail behavior of the Gaussian density function shows up more clearly on a logarithmic scale. 0 Normal Density Function in Log Scale 1 2 3 log phi(x) 4 5 6 7 8 9 4 3 2 1 0 1 2 3 4 x/sigma

Cumulative Normal Distribution The cdf (cumulative distribution function) of a normal random variable is given as the integral of the density, that is, Φ N (x) = 1 2π x exp( s 2 /2)ds. There is no closed-form expression for the integral, but it has the shape shown on the next slide.

Cumulative Normal Distribution (Cont d) 1 Cumumative Normal Distribution Function 0.9 0.8 0.7 0.6 Phi(x) 0.5 0.4 0.3 0.2 0.1 0 4 3 2 1 0 1 2 3 4 x

Maximum Likelihood Estimation for Gaussian Distributions Suppose we are given random samples y 1,..., y n of a random variable Y. The objective is to find the maximum likelihood estimate for a Gaussian distribution to fit the data. The Gaussian distribution has two adjustable parameters: the mean µ and the standard deviation σ. The question is: What choice of these parameters makes the observations most likely? (Hence the name maximum likelihood estimation, or MLE).

MLE for Gaussian Distributions (Cont d) It turns out that the answer is the following: The best choice for µ is the so-called sample mean ˆµ = 1 n n y i. i=1 The best choice for σ is given by [ n ˆσ = i=1 (y i ˆµ) 2 ] 1/2. So ˆµ is just the average value of the samples, and ˆσ is the average deviation of the samples around ˆµ.

Heights Data Set We apply MLE to the Hong Kong height data set consisting of 200 samples. The estimates ˆµ and ˆσ can be readily computed using the Matlab commands mean and std. Specifically, if y denotes the vector of the n samples, then the commands ˆµ = mean(y) and ˆσ = std(y) will give the MLE values. In this case it turns out that ˆµ = 67.9499, ˆσ = 1.9406, where both numbers are in inches.

Comparison of Empirical and Fitted CDFs To see how good the fit is, recall the sorted vector z, which consists of the samples y 1,..., y n arranged in increasing order. By definition, the empirical CDF has value i/n at the sample z i, the staircase function. By computing the fitted Gaussian CDF at each z i, we can get an idea of whether the Gaussian is a good fit or not. The comparison is shown on the next slide.

Gaussian Fit to Height Data 1 0.9 Gaussian Fit to Hong Kong Heights Data Empirical Gaussian Fit 0.8 0.7 Distribution Function 0.6 0.5 0.4 0.3 0.2 0.1 0 62 64 66 68 70 72 74 Height

Goodness of Fit: The K-S Test The figure shows the best fit to the data from within the family of Gaussian CDFs. But is it a good fit overall? The so-called K-S goodness of fit test allow us to address this question. K-S stands for Kolmogorov-Smirnov, the two Russian mathematicians who invented this test. What we show is the so-called one-sample K-S test, which is all we will use; we will not require the two-sample K-S test. The (one-sample) K-S test is very useful because it is universal it can be used with any candidate distribution, not just the Gaussian.

Goodness of Fit: The K-S Test (Cont d) To apply this test, denote ˆΦ(z i ) to be the value of the fitted distribution (Gaussian or otherwise) computed at the i-sorted sample z i. Recall that the empirical distribution equals i/n at the sample z i, the staircase function. Compute the K-S test statistic t KS = max i/n ˆΦ(z i ). i So the test statistic is just the worst-case discrepancy between the empirical and fitted distribution functions across all samples.

Goodness of Fit: The K-S Test (Cont d) To apply the K-S test, we need to choose a confidence level δ, usually 0.05 or 0.01 (though any arbitrary δ is permitted). Compute the threshold θ = [ 1 2n log 2 ] 1/2. δ Check to see whether t KS > θ. If so, we can reject the fitted distribution as being bad, with confidence 1 δ. If t KS θ, we accept the fit, or more accurately, we cannot reject the fit.

Goodness of Fit Test (Cont d) We aim for a 95% confidence level, so we define a confidence parameter δ = 1.95 = 0.05. There are 200 samples. Therefore the acceptable threshold, according to the above formula, is θ = 0.0960. The maximum error between the two curves is t KS = 0.0294. Because the maximjum discrepancy between the fitted and the empirical distributions is smaller than the threshold, we accept the Gaussian fit as being a fair description of the data. Later we will see an example where a fitted distribution is rejected because the maximum discrepancy is larger than the permitted threshold.

Predicting Percentiles Using Fitted Distributions In risk analysis, we are often interested in percentile values. If X is the random variable of interest, and if ζ is some number between 0 and 1, the ζ (or more accurately 100 ζ) percentile is the value a such that Pr{X a} = ζ, or equivalently Pr{X > a} = 1 ζ. So if ζ = 0.95, then a would be the 95th percentile, and so on. Fitted Distributions can be used to predict the percentile values on the basis of data.

Using Empirical vs. Fitted Distributions Suppose we have n samples of the random variable X (e.g., 200 height samples), and we wish to find the ζ percentile value. One way to do this is to sort the samples x 1,..., x n in ascending order, and call the resulting sequence z 1,..., z n. Then define k = ζn (the number ζn rounded up to the nearest integer). We can define the value z k as the empirical ζ percentile value. For example, if there are 200 samples, and ζ = 0.95, then the 190-th largest sample would be the empirically derived 95-th percentile value.

Using Empirical vs. Fitted Distributions (Cont d) This approach runs into trouble when we wish to predict very rare events, that is, ζ very close to 1. For instance, if n = 200 and ζ = 0.999, then k = n, and the largest sample is automatically taken as the percentile value, which is clearly not meaningful.

Estimating Height Percentiles Take the Hong Kong heights example. Suppose you are required to estimate a threshold such that 95% of the population is below that height. There are two ways to do this. First, you can find the 190-th largest sample, which is 71.0958 invhes. Second, using the Matlab command norminv, you can find a number a = Φ 1 (0.95) using the estimated ˆµ and ˆσ. This gives 71.1420.

Estimating Height Percentiles (Cont d) Similarly, the 99-th percentile can either the 198-th largest sample which is 72.4443, or Φ 1 (0.99) which gives 72.4645. This approach fails to find the 99.9-th percentile. But Φ 1 (0.999) = 73.9469 is a reliable estimate of this value. Note that the last number is larger than the largest number in the sample! Note that we can use the Gaussian fit to estimate percentiles because it passed the K-S test.

Outline Case Study: Gaussian Fit of Height Data 1 Case Study: Gaussian Fit of Height Data 2 3

Problem Statement You are given the daily prices of Microsoft stock for roughly 5.5 years. You wish to fit an appropriate probability distribution to these prices. Then you wish to use the fitted distribution to predict the so-called Value at Risk (VaR) of the stock price, at variour percentiles.

Choice of Appropriate Family of Distributions The stock price is always nonnegative. So, instead of trying to fit the stock price directly, we fit the daily returns of the stock. The daily return is defined as the logarithm of the ratio of today s price and yesterday s price. Clearly it can be both positive or negative. Let us denote the stock price random variable by Y, and the daily return random variable by X. If X has a Gaussian distribution, then Y is said to be log-normal. The more accurate phrase log-gaussian is somehow not used.

Gaussian Fit to Daily Returns From the 1342 daily price records, we can compute 1341 daily returns. We already know that the maximum likelihood estimate of a Gaussian distribution to this data is obtained using the sample mean ˆµ and the sample standard deviation ˆσ. In this case ˆµ = 5.6447 10 5. So for all practical purposes the sample mean is zero. Also, ˆσ = 0.0202, which means that on a typical day the stock goes up or down by 2%. Using these parameters, we can fit a Gaussian distribution to the data. The next slide shows the empirical and Gaussian fitted CDFs.

Empirical vs. Gaussian Fit Distributions 1 0.9 Gaussian Fit of Daily Returns of Microsoft Stock Empirical CDF Gaussian Fit 0.8 0.7 Distribution Function 0.6 0.5 0.4 0.3 0.2 0.1 0-0.15-0.1-0.05 0 0.05 0.1 0.15 0.2 Daily Returns on Microsoft Stock

Goodness of Fit Test Next we apply the K-S goodness of fit test. The acceptable threshold at a confidence level δ = 0.05 with n = 1341 samples is given by [ 1 θ = 2n log 2 ] 1/2, δ which in this case turns out to be 0.0371. However the K-S test statistic, defined as t KS = max i/n Φ(z i ) i where z i is the i-th largest sample, turns out to be 0.0832, which is larger than the acceptable threshold θ. So we can be at least 95% sure that the daily returns do not follow a Gaussian distribution, or in other words, the stock price itself does not follow a log-normal distribution.

Goodness of Fit Test (Cont d) In fact we can be a lot more than 95% sure that the data does not fit a Gaussian distribution. Compute δ = 2 exp( 2θnt 2 KS) = 1.6933 10 8. So we can be 1 δ, or approximately 99.999998% sure that the data does not fit a Gaussian distribution. So what can be done? Instead of a Gaussian family, we use the family of stable distributions. Stable distributions contain Gaussian distributions as a special case. So we will get at least as good a fit using stable distributions as with Gaussian distributions, and often a better fit.

Parameters of a Stable Distribution A Gaussian r.v. is completely specified by just two parameters, namely its mean µ and its standard deviation σ. A stable distribution is specified by four parameters: An exponent α (0, 2). A skew β [ 1, 1]. A scale γ R +. A location δ R. If α = 2 then we get a Gaussian distribution as a special case.

Interpretation of Parameters The four parameters mean what the names suggest: The exponent α controls how slowly the complementary distribution function Φ(u) decays as u. As α gets smaller, the densities get flatter and wider. The skew β is zero if the density function is symmetric, and nonzero otherwise. The scale γ is the spread on the u-axis. As γ is decreased, the density function gets spread out. The location δ centers the location of the distribution. The next several slides illustrate the role of these constants.

Varying Alpha phi(x) for various values of alpha 0.4 0.35 0.3 0.25 0.2 0.15 0.1 Stable Density Functions for Various Values of Alpha alpha = 1.8 alpha = 1.5 alpha = 1.1 alpha = 0.8 0.05 0 4 3 2 1 0 1 2 3 4 x As α is decreased, the peaks get higher and the tails get flatter.

Heavy-Tailed Behavior of Stable Distributions The Gaussian distribution can be thought of as a special case of a stable distribution with α = 2. If α < 2, then the r.v. is heavy-tailed in that its variance is infinite. If α < 1, then even the mean is infinite. Despite this, stable distributions with α < 2 often provide a far better fit to real-world data than Gaussian distributions.

Varying Beta 0.35 0.3 Stable Density Functions for Various Values of Beta beta = 0 beta = 1 beta = 1 phi(x) for various values of beta 0.25 0.2 0.15 0.1 0.05 0 4 3 2 1 0 1 2 3 4 x The brown and red curves are asymmetric, though this is hard to see.

Varying Gamma 0.7 0.6 Stable Density Functions for Various Values of Gamma gamma = 1 gamma = 0.5 gamma = 2 phi(x) for various values of gamma 0.5 0.4 0.3 0.2 0.1 0 4 3 2 1 0 1 2 3 4 x Smaller values of γ spread out the density function.

Varying Delta 0.35 0.3 Stable Density Functions for Various Values of Delta delta = 0 delta = 1 delta = 1 phi(x) for various values of delta 0.25 0.2 0.15 0.1 0.05 0 4 3 2 1 0 1 2 3 4 x Nonzero values of δ shift the curve to the left or the right but do not otherwise change the shape.

Fitting a Stable Distribution to Data The theory of maximum likelihood estimation for stable distributions is too advanced to cover in the lectures. However, the Matlab command stblfit can be used to fit a stable distribution to any set of samples. Ensure that the file stblfit.m is in the same directory from which Matlab is being executed.

Fitting a Stable Distribution to Microsoft Daily Returns Applying the command stblfit to the 1341 daily return samples of Microsoft results in these parameters α β γ δ = 1.5911 0.0050 0.0102 0.0000. In particular α is far smaller than 2, which corresponds to a Gaussian distribution. This may explain why a Gaussian fit fails the K-S test. The empirical and the stable-fitted distributions are shown on the next slide.

Empirical vs. Stable-Fit Distributions 1 0.9 Stable Fit to Daily Returns of Microsoft Stock Empirical Stable Fit 0.8 0.7 Distribution Function 0.6 0.5 0.4 0.3 0.2 0.1 0-0.15-0.1-0.05 0 0.05 0.1 0.15 0.2 Daily Returns on Microsoft Stock

Empirical vs. Gaussian Fit Distributions: Reprise 1 0.9 Gaussian Fit of Daily Returns of Microsoft Stock Empirical CDF Gaussian Fit 0.8 0.7 Distribution Function 0.6 0.5 0.4 0.3 0.2 0.1 0-0.15-0.1-0.05 0 0.05 0.1 0.15 0.2 Daily Returns on Microsoft Stock

Goodness of Fit Test for Stable Fit Distribution The K-S test statistic, which is t KS = max i/n Φ(z i ), i in this case turns out to be 0.0169, which is far smaller than the K-S test statistic for the Gaussian fit, which was 0.0832. On the other hand, the acceptable threshold with δ = 0.05 and n = 1341 samples is given, as before, by θ = [ 1 2n log 2 ] 1/2 = 0.0371. δ Because t KS < θ, we accept the stable fit distribution.

Predicting Percentiles Using Stable Fit Distribution Once we have a stable distribution that fits the data (as determined by the K-S test), we can use the Matlab command tt stblinv to determine various percentiles. If we set ζ = 0.95, then we can compute v ζ as stblinv(0.95,alpha,beta,gamma,delta, which equals 0.0290. This means that we are 95% sure that tomorrow s stock price will not increase by more than 2.9% over today s price. If we wish to be 99% sure, we set ζ = 0.99, and compute the threshold stblinv(0.99,alpha,beta,gamma,delta, which equals 0.0656. So we can be 99% sure that tomorrow s stock price won t be more than 6.5% higher.

Predicting Confidence Intervals Using Stable Fit Distribution Instead of finding one-sided limits, we can also find so-called confidence intervals using the fitted distribution. If we wish to find a 95% confidence interval for the return, we can compute stblinv(0.975,alpha,beta,gamma,delta) = 0.0405 and stblinv(0.025,alpha,beta,gamma,delta) = = -0.0404. So we can assert with 95% confidence that tomorrow s stock return (daily fluctuation) will lie between -0.0404 and 0.0405.

Outline Case Study: Gaussian Fit of Height Data 1 Case Study: Gaussian Fit of Height Data 2 3

Conditional PDFs and Densities: Motivation Example: The life expectancy of an American male at birth is 75.38 years. So if a man is now 65 years old, is his life expectancy 10.38 years? No! it is a longer! Reason: The life expectancy calculation of 75.38 years includes those who fail to reach the age of 65. So the expectancy has to be recomputed by taking this into account. Example: The average rainfall in July in a certain city is 10.04 inches. It has already rained 8 inches by the middle of July. So how much more rain can be expected in the second half of July? Answer is not 2.04 inches!

Conditional PDFs and Densities: Definition Suppose X is a random variable with pdf Φ X ( ) and density φ X ( ), and b is some specified number. What are the pdf and density of X once it is specified that X > b? 0, if a b, Φ X>b (a) = Φ X (a) Φ X (b), if a > b, Φ X (b) The formula looks cleaner if expressed in terms of Φ X. 1, if a b, Φ X>b (a) = Φ X (a), if a > b, Φ X (b)

Conditional PDFs and Densities: Definition (Cont d) 0, if a b, φ X>b (a) = φ X (a), Φ X (b) if a > b, Using the conditional density, we can compute the conditional mean (usually the quantity of greatest interest), conditional variance etc.

Example: Longevity in the USA The US Social Security Administration (SSA) publishes data on the longevity of males and females. Starting with a cohort of 100,000 persons, the data shows how many are alive at the end of year 1, year 2 etc. So this data represents the complementary cumulative distribution function.

Longevity 2 1 0.9 Male and Female Longevity in the USA Male Female 0.8 0.7 Complementary cdf 0.6 0.5 0.4 0.3 0.2 0.1 0 0 20 40 60 80 100 120 Years

Longevity 3 The figure below shows the fraction of the original cohort who die each year. 0.04 0.035 Male and Female Mortality in the US Male Female 0.03 0.025 Density 0.02 0.015 0.01 0.005 0 0 20 40 60 80 100 120 Years

Life Expectancy at Birth and at Age 65 Computing life expectancy at birth gives 75.3816 years for males and 80.4290 years for females. If we focus on those who survive until age 65, the figures are 82.1933 years for males and 84.8865 years for females.