Lecture 7. Markov Model with Matrixes

Slides:



Advertisements
Similar presentations
Lecture 7. Distributions
Advertisements

CS433: Modeling and Simulation
DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
Acknowledgement: Thanks to Professor Pagano
Random Variable A random variable X is a function that assign a real number, X(ζ), to each outcome ζ in the sample space of a random experiment. Domain.
Chapter 5 Some Important Discrete Probability Distributions
Chapter 5 Discrete Random Variables and Probability Distributions
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
A.P. STATISTICS LESSON 7 – 1 ( DAY 1 ) DISCRETE AND CONTINUOUS RANDOM VARIABLES.
ฟังก์ชั่นการแจกแจงความน่าจะเป็น แบบไม่ต่อเนื่อง Discrete Probability Distributions.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Statistics.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Pearson Prentice-Hall, Inc.Chap 5-1 Statistics for Managers Using Microsoft® Excel 5th Edition.
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
Chapter 4 Discrete Random Variables and Probability Distributions
Chapter 5 Basic Probability Distributions
Probability Distributions
Probability Distributions
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Statistics.
Probability &Statistics Lecture 8
Probability and Statistics Review
Chapter 5 Discrete Probability Distributions
Discrete and Continuous Probability Distributions.
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
11/5/2003Probability and Statistics for Teachers, Math 507, Lecture 10 1 UNIFORM AND EXPONENTIAL RANDOM VARIABLES Sections
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
1 Chapter 12 Introduction to Statistics A random variable is one in which the exact behavior cannot be predicted, but which may be described in terms of.
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
Chapter 6: Probability Distributions
Tch-prob1 Chap 3. Random Variables The outcome of a random experiment need not be a number. However, we are usually interested in some measurement or numeric.
2.1 Random Variable Concept Given an experiment defined by a sample space S with elements s, we assign a real number to every s according to some rule.
5-1 Business Statistics: A Decision-Making Approach 8 th Edition Chapter 5 Discrete Probability Distributions.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
Theory of Probability Statistics for Business and Economics.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Basic Business Statistics.
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Continuous Random Variables.
2.1 Introduction In an experiment of chance, outcomes occur randomly. We often summarize the outcome from a random experiment by a simple number. Definition.
Week 21 Conditional Probability Idea – have performed a chance experiment but don’t know the outcome (ω), but have some partial information (event A) about.
1 Since everything is a reflection of our minds, everything can be changed by our minds.
STA347 - week 31 Random Variables Example: We roll a fair die 6 times. Suppose we are interested in the number of 5’s in the 6 rolls. Let X = number of.
Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Review of Probability. Important Topics 1 Random Variables and Probability Distributions 2 Expected Values, Mean, and Variance 3 Two Random Variables.
Random Variables Example:
Topic 5: Continuous Random Variables and Probability Distributions CEE 11 Spring 2002 Dr. Amelia Regan These notes draw liberally from the class text,
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 5-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
EQT 272 PROBABILITY AND STATISTICS
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Business Statistics,
Chap 5-1 Discrete and Continuous Probability Distributions.
Chapter 4 Discrete Random Variables and Probability Distributions
Chapter5 Statistical and probabilistic concepts, Implementation to Insurance Subjects of the Unit 1.Counting 2.Probability concepts 3.Random Variables.
ONE DIMENSIONAL RANDOM VARIABLES
Random variables (r.v.) Random variable
The Exponential and Gamma Distributions
CHAPTER 2 RANDOM VARIABLES.
The Bernoulli distribution
Multinomial Distribution
Chapter 5 Some Important Discrete Probability Distributions
Econometric Models The most basic econometric model consists of a relationship between two variables which is disturbed by a random error. We need to use.
Discrete Probability Distributions
Discrete Probability Distributions
Discrete Probability Distributions
Discrete Probability Distributions
M248: Analyzing data Block A UNIT A3 Modeling Variation.
Discrete Probability Distributions
Discrete Probability Distributions
Presentation transcript:

Lecture 7. Markov Model with Matrixes Lecture 7. Markov Model with Matrixes. Introduction to HMM with the example of DNA analysis. Distributions. Probability density and cumulative distribution functions. Poisson and Normal distributions. Practice: Distributions with Mathematica

7.1 Reminder We remind here some facts about the distributions of discrete and continuous random variables. The discrete random distribution can be characterized by a probability function p(xi) assigning the probabilities to all possible values xi of a random variable X. The probability function should satisfy the following equations : Compare with the pages 31 … of Lect. 1

Example: Suppose that a coin is tossed twice, so that the sample space is ={HH,HT,TH,TT}. Let X represent a number of heads that can come up. Find the probability function p(x). As we know, the probability function is thus given by the table: x 1 2 p(x) 1/4 1/2 The graphical example presented below represents a typical way of depicting the probability distribution for a discrete random variable

~p(xi) 0.3 1 2 3 4 5 6 7 8 9 10 11 Possible values of the random variable, xi

Continuous distribution. Probability density function (PDF). Remember: For a continuous variable we must assign to each outcome a probability p(x )=0. Otherwise, we would not be able to fulfill the requirement 7.1 (the second of three). A random variable X is said to have a continuous distribution with density function f(x) if for all a b we have The analogs of Eqs. 7.2 and 7.3 for the continuous distributions would be

f(x) P(a<X<b) a b P(E) is a probability that X belongs to E. Geometrically, P(a<X<b) is the area under the curve f(x) between a and b. The question: Can f(x) exceed 1? Please argue.

7.2 A few new distributions and their properties a. Poission distribution Poisson distribution is one of the most important discrete distributions. Its probability function is Poisson distribution is a limiting case of the Binomial distribution P(pn,n), with parameters pn and n such that In other words, if we have a large number of independent events with small probability, then number of occurrences has approximately Poisson distribution. Let us introduce now a more intuitive definition of the Poisson distribution.

Examples with Poisson distribution 1. Suppose that the probability of a defect in a foot of magnetic tape is 0.002. Use the Poisson distribution to compute the probability that 1500 feet roll will have no defects .

This example helps to describe the Poisson Distribution in a new way by noticing that is the expected (average) value of the defects in 1500 feet of the tape. In other words, the PD gives the probability of n events happening in some experiment if the expected (average) number of the events, , for this particular experiment, is known. Attention: it is important to understand that is the average (expected) value for the interval (of time, or space) where the n questioned events should occur. For instance, in the former example is the average value of defects per 1500 feet of tape (but not per a foot, or per 1000 feet, etc).

Example 2 An airline company sells 200 tickets for a plane with 198 seats, knowing that a probability that a passenger will not show up for the flight is 0.008. Use the Poisson approximation to compute the probability that they will have enough seats for all the passengers that will show up.

Solution. p=0.012, L=0.012*200=2.4 – the average number (out of 200 passengers ) that won’t show up for the flight. p[x]= Exp[-2.4]2.4x/x!; P[more than 1 person won’t show up] = 1-p[0]-p[1]= ~ 0.7. In other words, there is (only) a 30% of chance that they more than 198 passengers will show up. This is quite a familiar scenario: the company would typically offer you a free additional ticket for a future flight if you agree on switching to a later flight. 

Example 3: (working in groups) 10% of the tools produced in a certain manufacturing process turns out to be defective. Find a probability that in a sample of ten tools selected at random, exactly 2 will be defective, by using (a) binomial and (b) Poisson distribution. Open a Mathematica file, and find the probabilities

b. The exponential distribution (this is the continuous distribution, for the continuous random variable x). Those who know how to integrate can verify that (7.8) satisfies (7.5) (the total area under the curve f(x) equals 1. Note: In Matematica, the integral of a function f[x] can be found as: Integrate[f[x],{x,x1,x2}] , Shift+Enter. Here x1 and x2 are the limits of integration.

DSolve[{n’[t] + G n[t] == 0, n[0] == n0},n[t],t]; A typical example of the exponential distribution results from the discussion of the waste products of the nuclear power plant. If at time t=0 there are N(0) identical unstable particles, and the number of particles dN(t) decaying in time dt is proportional to dt and to the number of particles, then we have dN(t)= - N(t)dt This is so called differential equation. Here is how it is solved with Mathematica. DSolve[{n’[t] + G n[t] == 0, n[0] == n0},n[t],t]; n[t]-> n0 Exp[-Gt]; As a result we came up with the exponential distribution.

c. The standard normal distribution Let’s introduce the “half-time” T , such that N(T)=N0/2. Then we find : T=ln2=0.693. c. The standard normal distribution f(x)=(2)-1/2 exp(-x2/2) (7.12) A. Using Mathematica, check that this PDF satisfies the normality condition (7.5). Make a plot of (7.12). If a random variable y is related to x as y=ax+b, how the distribution function f(y) looks like? (we assume that x is distributed according to (7.12).

More generally, X is said to have a normal (,2) distribution if it has density function f(x)=(2 2)-1/2 exp[-(x- )2/2 2] (7.12’) 2 is called “variance” and  is the “mean” or the “expectation”. Try to analyze, assigning different numeric values to  and 2 how they affect the shape of f(x). For instance, how the parameters for the green and red curves are related? Green and blue? See the Mathematica file

7.3 Probability distribution function ( also called “cumulative distribution function”= CDF) 1. Continuous random variable From the “outside”, random distributions are well described by the probability distribution function (we will use CDF for short) F(x) defined as This formula can also be rewritten in the following very useful form: Question: Can F(x) exceed 1? Argue it.

To see what the distribution functions look like, we return to our examples. 1. The uniform distribution (7.7): Using the definition (7.13) and Mathematica, try to find F(x) for the uniform distribution. Prove that F(x)=0 for x a; (x-a)/(b-a) for a  x  b; 1 for x>b. Draw the CDF for several a and b. Consider an important special case a=0, b=1. How is it related to the spinner problem? To the balanced die? 2. The exponential distribution (7.8):

Use Mathematica to prove that F(x)= 0 for x  0; 1-exp(-x) for x >0. (7.15) “Lack of memory” for the exponential distribution Suppose that X has an exponential distribution (7.8). The probability that the event (such as the radioactive decay) did not happen in t units of time is P(X>t) = 1-F(x). According to (7.15) it results in P(X>t)= exp(-t) . Let’s find now a probability that we will have to wait some additional time s given that we have been waiting t units of time: P(X>t+s|T>t) = P(X > t+s)/P(X > t) = exp[-(t+s)]/ exp[-t)]= exp[-s]. As we see, the result depends only on s and does not depend on the previous waiting time. The probability you must wait additional s units of time till decay occurs is the same as if you had not been waiting at all.

The standard normal distribution Using Mathematica and Eq. (7.12), find F[x] for the snd. Use NIntegrate[f[t],{t,-,x}] and Plot[…] functions. 2. CDF for discrete random variables For discrete variables the integration is substituted for summation: It is clear from this formula that if X takes only a finite number of values, the distribution function looks like a stairway.

Draw F(x) for the example in page 7. p(x4) 1 p(x3) p(x2) p(x1) x1 x2 x3 x4 x Draw F(x) for the example in page 7.

This problem is for your practice Predicting the rate of mutation based on the Poisson probability distribution function. The evolutionary process of amino acid substitutions in proteins is