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:
name | Distribution | Input Parameter A | Input Parameter B | Input Parameter C |
---|---|---|---|---|
'beta' or 'Beta' | Beta Distribution | a | b | — |
'bino' or 'Binomial' | Binomial Distribution | n: number of trials | p: 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 Distribution | a: shape parameter | b: scale parameter | — |
'gev' or 'Generalized Extreme Value' | Generalized Extreme Value Distribution | k: shape parameter | σ: scale parameter | μ: location parameter |
'gp' or 'Generalized Pareto' | Generalized Pareto Distribution | k: tail index (shape) parameter | σ: scale parameter | μ: threshold (location) parameter |
'geo' or 'Geometric' | Geometric Distribution | p: probability parameter | — | — |
'hyge' or 'Hypergeometric' | Hypergeometric Distribution | M: size of the population | K: number of items with the desired characteristic in the population | n: number of samples drawn |
'logn' or 'Lognormal' | Lognormal Distribution | μ | σ | — |
'nbin' or 'Negative Binomial' | Negative Binomial Distribution | r: number of successes | p: 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 Distribution | b: 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 Distribution | a: scale parameter | b: 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