In such cases, there are two ways to make sure it does what you want: But, sometimes, such as with discrete distributions over a wide range of integers, it may be ambiguous. If «X» contains numbers with many identical values, it guesses discrete. If «X» contains numbers with few or no identical values, it guesses continuous. If «X» contains text values it knows «X» must be discrete. CDF(x) does the same, generating a cumulative mass or cumulative probability function. PDF(X) generates a probability mass function or density function according to whether it thinks «X» is discrete or continuous. Is the distribution discrete or continuous? Some fields of study prefer the use of exceedance in place of CDF curves. The exceedance curve is just one minus the CDF curve (i.e., the CDF curve flipped vertically), which denotes the probability that the true outcome exceeds the given level.
When «exceedance» is specified as true to the Cdf function, the function returns the exceedance curve instead of the cumulative probability. Usually the best value is 0, which is the default. If «smoothingMethod» is KDE, this factor specifies the degree of smoothness from -1, maximal detail to +1 maximal smoothing.
SmoothingMethod 0 = "Histogram": Shows PDF as a histogram 1 = "KDE": Uses Kernel Density Estimation to generate a smooth curve with «smoothingFactor» below from -1 to 1 (default 0) 2 = "KDE": Uses Kernel Density Estimation to generate a smooth curve with «smoothingFactor» below treated as global bandwidth in same units as «x». Name of a variable whose Domain attribute should be used (see below)
Otherwise it uses the system default set in the Uncertainty setup dialog from the Result menu. SamplesPerStepĪn integer specifying the number of samples per bin. 2 = "equal-weighted-P": Equal sum of weights of samples, weighted by «w». 1 = "equal-sample-P": Equal numbers of sample values in each step. Options are:Ġ = "equal-X": Equal steps along the «X» axis (values of «X»). Otherwise it uses the system default set in the Uncertainty Setup dialog from the Result menu. Set True or False to force discrete or continuous treatment. Defaults to system variable SampleWeights. Can be used to weight each sample point differently. a Monte Carlo sample - but you can also specify another index to generate a histogram over another dimension. The index over which the functions generate the histogram. For example, to generate a histogram of Y over index J, use: You can also use PDF and CDF to generate histograms of data that is not uncertain, i.e. If it is discrete, the result contains the probability mass (or cumulative probability for CDF) indexed by PossibleValues. If the distribution is continuous, the result is indexed by Step, and DensityIndex, with elements 'X' and 'Y', where 'y' contains the probability density (or cumulative probability for CDF). You can override that assumption by specifying the optional parameter discrete: True or discrete: False. They assume «X» is discrete if it contains text values or if it contains numerical values with many repetitions - or continuous if it contains only numbers with few or no repetitions. Usually, PDF and CDF figure out whether the «X» is discrete or continuous automatically. a sample indexed by Run, usually generated from a probability distribution. Here the distribution, «X», should be uncertain - i.e. PDF(x: I: IndexType=Run w: NonNegative = SampleWeighting discrete: optional boolean binMethod, samplesPerStep: optional positive domain: Unevaluated = x) CDF(x: I: IndexType=Run w: NonNegative = SampleWeighting discrete: Optional Boolean binMethod, samplesPerStep: Optional Positive domain: Unevaluated = x) ExamplesĪ common use is to generate the PDF or CDF table of an uncertain variable «X», generated as a random sample, e.g.: The functions also accept several optional parameters, described below, with the following syntax: PDF and CDF have one required parameter, «X» to denote sample data points, indexed by I. Similarly, CDF can generate a cumulative mass or cumulative distribution function. If «X» contains a sample from a discrete distribution, the result is a probability mass function (histogram) or density function. They can also work with data with indexes other than Run, the default index for uncertain samples. But, as functions, they return results as arrays available for further processing, display, or export.
They are similar to the methods used to generate the uncertainty views PDF and CDF for uncertain quantities. CDF generates a cumulative distribution function for «X». PDF generates a histogram or probability density function for «X», where «X» is a sample of data. 2.10 Is the distribution discrete or continuous?.