Simulation & Probabilistic Analysis SDK
Add Distribution Fitting & Simulation Features to Your Applications

SPA SDK Help HomeLearn More About the SPA SDK

Using Distributions

The SPA SDK provides the SPADistribution object that represents a probability distribution with specific parameters. This object can be used in many ways:

Specifying the Distribution

To define a distribution, you should first specify the distribution type (Exponential, Gamma etc.) using the SPADistribution.Type property, then specify the distribution parameters using the SPADistribution.Param property.

Evaluating the Distribution Functions

Once the distribution type and parameters are specified, you can use the SPADistribution object member functions to evaluate the following functions:

Example

The following example evaluates the Probability Density Function of the Weibull distribution with parameters alpha=1.5, beta=2 at x=1:

Sub Test()
  Dim dist As New SPADistribution
  Dim x, y As Double

  SPAApplication.Initialize

  ' specify the distribution type and parameters
  dist.Type = SPADistWeibull  ' Weibull distribution 
  dist.Param(0) = 1.5         ' alpha
  dist.Param(1) = 2           ' beta

  ' evaluate the PDF 
  x = 1
  y = dist.Pdf(x)
End Sub
  
Copyright © MathWave Technologies
www.mathwave.com