Monday, December 5, 2011

Probability Density Function Matlab

probability density function matlab

Syntax

Y = pdf(name,X,A)

Y = pdf(name,X,A,B)

Y = pdf(name,X,A,B,C)

Description

Y = pdf(name,X,A) computes the anticipation body action for the one-parameter ancestors of distributions defined by name. Connected ethics for the administration are accustomed in A. Densities are evaluated at the ethics in X and alternate in Y.

If X and A are arrays, they have to be the aforementioned size. If X is a scalar, it is broadcast to a connected cast the aforementioned admeasurement as A. If A is a scalar, it is broadcast to a connected cast the aforementioned admeasurement as X.

Y is the accepted admeasurement of X and A afterwards any all-important scalar expansion.

Y = pdf(name,X,A,B) computes the anticipation body action for two-parameter families of distributions, area connected ethics are accustomed in A and B.

If X, A, and B are arrays, they have to be the aforementioned size. If X is a scalar, it is broadcast to a connected cast the aforementioned admeasurement as A and B. If either A or B are scalars, they are broadcast to connected matrices the aforementioned admeasurement as X.

Y is the accepted admeasurement of X, A, and B afterwards any all-important scalar expansion.

Y = pdf(name,X,A,B,C) computes the anticipation body action for three-parameter families of distributions, area connected ethics are accustomed in A, B, and C.

If X, A, B, and C are arrays, they have to be the aforementioned size. If X is a scalar, it is broadcast to a connected cast the aforementioned admeasurement as A, B, and C. If any of A, B or C are scalars, they are broadcast to connected matrices the aforementioned admeasurement as X.

Y is the accepted admeasurement of X, A, B and C afterwards any all-important scalar expansion.


Acceptable strings for name are:
nameDistributionInput Parameter AInput Parameter BInput Parameter C
'beta' or 'Beta'Beta Distributionab
'bino' or 'Binomial'Binomial Distributionn: number of trialsp: probability of success for each trial
'chi2' or 'Chisquare'Chi-Square Distributionν: degrees of freedom
'exp' or 'Exponential'Exponential Distributionμ: mean
'ev' or 'Extreme Value'Extreme Value Distributionμ: location parameterσ: scale parameter
'f' or 'F'F Distributionν1: numerator degrees of freedomν2: denominator degrees of freedom
'gam' or 'Gamma'Gamma Distributiona: shape parameterb: scale parameter
'gev' or 'Generalized Extreme Value'Generalized Extreme Value Distributionk: shape parameterσ: scale parameterμ: location parameter
'gp' or 'Generalized Pareto'Generalized Pareto Distributionk: tail index (shape) parameterσ: scale parameterμ: threshold (location) parameter
'geo' or 'Geometric'Geometric Distributionp: probability parameter
'hyge' or 'Hypergeometric'Hypergeometric DistributionM: size of the populationK: number of items with the desired characteristic in the populationn: number of samples drawn
'logn' or 'Lognormal'Lognormal Distributionμσ
'nbin' or 'Negative Binomial'Negative Binomial Distributionr: number of successesp: probability of success in a single trial
'ncf' or 'Noncentral F'Noncentral F Distributionν1: numerator degrees of freedomν2: denominator degrees of freedomδ: noncentrality parameter
'nct' or 'Noncentral t'Noncentral t Distributionν: degrees of freedomδ: noncentrality parameter
'ncx2' or 'Noncentral Chi-square'Noncentral Chi-Square Distributionν: degrees of freedomδ: noncentrality parameter
'norm' or 'Normal'Normal Distributionμ: mean σ: standard deviation
'poiss' or 'Poisson'Poisson Distributionλ: mean
'rayl' or 'Rayleigh'Rayleigh Distributionb: scale parameter
't' or 'T'Student's t Distributionν: degrees of freedom
'unif' or 'Uniform'Uniform Distribution (Continuous)a: lower endpoint (minimum)b: upper endpoint (maximum)
'unid' or 'Discrete Uniform'Uniform Distribution (Discrete)N: maximum observable value
'wbl' or 'Weibull'Weibull Distributiona: scale parameterb: shape parameter

Examples

Compute the pdf of the accustomed administration with beggarly 0 and accepted aberration 1 at inputs –2, –1, 0, 1, 2:

p1 = pdf('Normal',-2:2,0,1)

p1 =

0.0540 0.2420 0.3989 0.2420 0.0540

The adjustment of the ambit is the aforementioned as for normpdf.

Compute the pdfs of Poisson distributions with amount ambit 0, 1, ..., 4 at inputs 1, 2, ..., 5, respectively:

p2 = pdf('Poisson',0:4,1:5)

p2 =

0.3679 0.2707 0.2240 0.1954 0.1755

The adjustment of the ambit is the aforementioned as for poisspdf.

No comments:

Post a Comment