Nonlinear function minimization (review). Newton’s minimization method Ecological detective p. 267 Isaac Newton We want to find the minimum value of f(x)

Slides:



Advertisements
Similar presentations
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
Advertisements

ฟังก์ชั่นการแจกแจงความน่าจะเป็น แบบไม่ต่อเนื่อง Discrete Probability Distributions.
CHAPTER 13: Binomial Distributions
Maximum likelihood estimates What are they and why do we care? Relationship to AIC and other model selection criteria.
Descriptive statistics Experiment  Data  Sample Statistics Sample mean Sample variance Normalize sample variance by N-1 Standard deviation goes as square-root.
458 Fitting models to data – II (The Basics of Maximum Likelihood Estimation) Fish 458, Lecture 9.
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
Lec 6, Ch.5, pp90-105: Statistics (Objectives) Understand basic principles of statistics through reading these pages, especially… Know well about the normal.
Discrete Probability Distributions
3-1 Introduction Experiment Random Random experiment.
Today Today: Chapter 8 Assignment: 5-R11, 5-R16, 6-3, 6-5, 8-2, 8-8 Recommended Questions: 6-1, 6-2, 6-4, , 8-3, 8-5, 8-7 Reading: –Sections 8.1,
458 Fitting models to data – III (More on Maximum Likelihood Estimation) Fish 458, Lecture 10.
Statistics for Managers Using Microsoft® Excel 5th Edition
Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson6-1 Lesson 6: Sampling Methods and the Central Limit Theorem.
Discrete and Continuous Probability Distributions.
Chapter 4 Continuous Random Variables and Probability Distributions
Distributions Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 4 and 5 Probability and Discrete Random Variables.
Chapter 5 Sampling Distributions
Copyright warning. COMP5348 Lecture 6: Predicting Performance Adapted with permission from presentations by Alan Fekete.
Probability theory 2 Tron Anders Moger September 13th 2006.
0 Simulation Modeling and Analysis: Input Analysis K. Salah 8 Generating Random Variates Ref: Law & Kelton, Chapter 8.
Chapter 5 Statistical Models in Simulation
The Triangle of Statistical Inference: Likelihoood
Random Variables & Probability Distributions Outcomes of experiments are, in part, random E.g. Let X 7 be the gender of the 7 th randomly selected student.
Modeling and Simulation CS 313
What is a probability distribution? It is the set of probabilities on a sample space or set of outcomes.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Review and Preview This chapter combines the methods of descriptive statistics presented in.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Chapter 4 Probability Distributions
Sampling distributions - for counts and proportions IPS chapter 5.1 © 2006 W. H. Freeman and Company.
Probability Distributions and Dataset Properties Lecture 2 Likelihood Methods in Forest Ecology October 9 th – 20 th, 2006.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
CHAPTER Discrete Models  G eneral distributions  C lassical: Binomial, Poisson, etc Continuous Models  G eneral distributions 
Binomial Probability Distribution
The Triangle of Statistical Inference: Likelihoood Data Scientific Model Probability Model Inference.
1 Since everything is a reflection of our minds, everything can be changed by our minds.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
June 11, 2008Stat Lecture 10 - Review1 Midterm review Chapters 1-5 Statistics Lecture 10.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 5-1 Business Statistics: A Decision-Making Approach 8 th Edition Chapter 5 Discrete.
EAS31116/B9036: Statistics in Earth & Atmospheric Sciences Lecture 3: Probability Distributions (cont’d) Instructor: Prof. Johnny Luo
Stats Probability Theory Summary. The sample Space, S The sample space, S, for a random phenomena is the set of all possible outcomes.
POSC 202A: Lecture 4 Probability. We begin with the basics of probability and then move on to expected value. Understanding probability is important because.
Starting point for generating other distributions.
Learning Simio Chapter 10 Analyzing Input Data
Chapter 3 Discrete Random Variables and Probability Distributions  Random Variables.2 - Probability Distributions for Discrete Random Variables.3.
Ka-fu Wong © 2003 Chap 6- 1 Dr. Ka-fu Wong ECON1003 Analysis of Economic Data.
Chapter 5 Sampling Distributions. Introduction Distribution of a Sample Statistic: The probability distribution of a sample statistic obtained from a.
Chapter 5 Probability Distributions 5-1 Overview 5-2 Random Variables 5-3 Binomial Probability Distributions 5-4 Mean, Variance and Standard Deviation.
3.1 Statistical Distributions. Random Variable Observation = Variable Outcome = Random Variable Examples: – Weight/Size of animals – Animal surveys: detection.
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Business Statistics,
Hypothesis Testing and Statistical Significance
Review. Common probability distributions Discrete: binomial, Poisson, negative binomial, multinomial Continuous: normal, lognormal, beta, gamma, (negative.
Chap 5-1 Discrete and Continuous Probability Distributions.
Theoretical distributions: the other distributions.
Probability distributions and likelihood
Modeling and Simulation CS 313
Quiz 2.
CHAPTER 14: Binomial Distributions*
Discrete random variable X Examples: shoe size, dosage (mg), # cells,…
Chapter 5 Sampling Distributions
Chapter 5 Sampling Distributions
Multinomial Distribution
Chapter 3 Discrete Random Variables and Probability Distributions
Chapter 5 Some Important Discrete Probability Distributions
Discrete random variable X Examples: shoe size, dosage (mg), # cells,…
Chapter 5 Sampling Distributions
Probability Theory and Specific Distributions (Moore Ch5 and Guan Ch6)
Review of the Binomial Distribution
Presentation transcript:

Nonlinear function minimization (review)

Newton’s minimization method Ecological detective p. 267 Isaac Newton We want to find the minimum value of f(x)

Golden section search L = 0U = 1x1x1 x2x2 L = x 1 x2x2 x3x3 U = 1L = x 2 x3x3 x4x4 Step 1 Step 2 Step 3

Simplex approach This is a very sophisticated form of hill climbing, and is derivative-free. Algorithm called “amoeba”. Source:

Simulated annealing Randomly jump to a new spot, if it is better then stay there, if it is worse, go back to initial jump Source:

Complications with model fitting Parameter confounding (correlations) Problems with numerical derivatives Non-continuous problems Integer parameters Multiple minima Constrained parameters

Transform bounded parameters to unbounded using Then let Solver search over x, but use y in the model equations 6 atan_demo.xlsx

Arctan transformation 6 atan_demo.xlsx

Hints for minimization Constrain population sizes to not go negative Bound parameters in code using ABS or ATAN Particularly problematic are multiple proportions that must add to 1 –Fix each p to be 1-sum of the previous ones In Solver set convergence criteria smaller Keep away from extremely small or extremely large values

Conclusions Non-linear minimization is as much art as science You cannot just plug numbers into a program and hope for the best, you must make checks to assure convergence Takes time and experience, but is well rewarded

Probability distributions and likelihood

Readings Ecological detective: –Chapter 3 Probability distributions Wikipedia (seriously!) –e.g. Beta distribution, lognormal distribution, etc.

Overview Probability vs. likelihood Probability distributions: binomial, poisson, normal, lognormal, negative binomial, beta, gamma, multinomial Likelihood profile The concept of support Model selection, likelihood ratio, AIC Robustness Contradictory data

Probability If I flip a fair coin 10 times, what is the probability of it landing heads up every time? Given the fixed parameter (p = 0.5), what is the probability of different outcomes? Probabilities add up to 1. I flipped a coin 10 times and obtained 10 heads. What is the likelihood that the coin is fair? Given the fixed outcomes (data), what is the likelihood of different parameter values? Likelihoods do not add up to 1. Hypotheses (parameter values) are compared using likelihood values (higher = better). Likelihood

Probability What is the probability that 5 ≤ x ≤ 10 given a normal distribution with µ = 13 and σ = 4? Answer: What is the probability that –1000 ≤ x ≤ 1000 given a normal distribution with µ = 13 and σ = 4? Answer: What is the likelihood that µ = 13 and σ = 4 if you observed a value of (a)x = 10 (answer: the likelihood is 0.075) (b)x = 14 (answer: the likelihood is 0.097) Conclusion: if the observed value was 14, it is more likely that the parameters are µ = 13 and σ = 4, because is higher than Likelihood Area under curve between 5 and 10 Height of curve at x = 14 Height of curve at x = 10

We use the same (normal) probability distribution function for both probability and likelihood!

Common probability distributions Discrete: binomial, Poisson, negative binomial, multinomial Continuous: normal, lognormal, beta, gamma, (negative binomial)

7 distributions.xlsx Examples of all distributions defined here, including excel functions and functions defined directly in the spreadsheet

Binomial probability distribution Number of trials Number of successes Probability of success [0,1] The “factorial term” How many ways are there of selecting k objects from among N objects Example: probability of getting k = 5 heads when flipping a coin N = 10 times, if the coin is fair (p = 0.5). Note: known number of trials.

SD and CV (all distributions)

Poisson probability distribution Number of events Expected number of events Example: On average there are λ = 9.4 fatal traffic accidents in Washington State every week. What is the probability that there would be k = 0 in a week? (Note: rare event out of large number of possible events.)

Limitations of Poisson Has only one parameter, which is both the mean and the variance We often have discrete count data, but in real-life data the variance is often larger than predicted by the Poisson

Thus we often use the negative binomial Closely related to the Poisson and binomial One extra parameter related to the variance VERY useful Looks scary, but don’t be scared!

Standard negative binomial Number of successes Number of failures Probability of a success Example: a factory makes widgets successfully with probability p. How many successful widgets have been made when r = 3 failed widgets have been made. The distribution predicts the probability of k = 0, 1, 2, … successful widgets being made. Squint a lot and this looks kind of like a binomial

Ecological usefulness? Almost no ecological problems can be thought of as successes or failures in this way Great for factory production problems But we want a function with parameters for –Mean –Overdispersion (increased variance = increased chance of extreme events) Integer events are rare in nature, we want to deal with real numbers

Practitioner’s negative binomial Predicted mean As θ increases, variance increases, hence “overdispersion” As θ → ∞, var(Z) → ∞ As θ → 0, var(Z) = λ, just like a Poisson! Example: our data contain observations k, with mean λ and variance greater than λ. Find the value of overdispersion θ that best accounts for this increased variance. Overdispersion parameter Gamma function (factorial that accepts non-integers, see later)

Weird facts about the practitioner’s negative binomial When θ → 0 this doesn’t just smell like a Poisson, and act like a Poisson, it is the Poisson (advanced stats) By replacing the factorials with gamma functions, the r and k can be real numbers not just integers What on earth is a gamma function???

Gamma function Γ() A generalized factorial function that accepts real numbers not just integers Excel: does not have a gamma function but has a ln of gamma function (GAMMALN)

Multinomial probability distribution Example: fitting a model to proportions at age (or proportions at length) data. Model produces predicted proportions p i and data gives observed numbers x i in each category. Total numbers sampled = n = x 1 + x 2 + … + x k Predicted proportion in category k Observed number in category k Total number observed

Unrealism of multinomial (and other distributions too!) Assumes every sampling event is completely independent But there is much correlation in reality –Same trawl, area, time of day, day of year, gender, etc. Real data never ever fit a multinomial this well Later lectures will introduce the concept of “effective sample size” n eff, which will be smaller than reported sample size n.

Normal distribution

Lognormal distribution

Lognormal: key notes 0 < x < ∞ Mean(x) is not µ If we want the mean to be µ, then replace the model parameter with: Used widely for abundance and biomass

Beta distribution 0.5,0.5 1,1 1.3,1.3 4,4 50,50 2,60.5,2

Beta: key notes Values confined to be 0 < x < 1 Can mimic almost any shape within those bounds Although bounded, can change the bounds by multiplying / dividing x values E.g. survival parameters

Gamma distribution 4, 1 4, 2 1.1, , , 5

Gamma: key notes 0 ≤ x < ∞ Somewhat like an exponential, lognormal, or normal Flexibility without being bounded like the beta distribution E.g. salmon arrival numbers plotted over time Excel function beta.dist() assumes parameters α* = α and β* =1/β