Main Content

ShiftedExponentialDistribution

R2026b

Shifted exponential probability distribution object

Since R2026b

    Description

    A ShiftedExponentialDistribution object consists of parameters, a model description, and sample data for a shifted exponential probability distribution.

    The shifted exponential distribution generalizes the exponential distribution by adding a location parameter θ. When θ = 0, the shifted exponential distribution reduces to the one-parameter exponential distribution. The exponential distribution is used to model events that occur randomly over time, and its main application area is the study of lifetimes.

    The shifted exponential distribution uses the following parameters.

    ParameterDescriptionSupport
    muMean of the unshifted exponential distributionμ>0
    thetaLocation (threshold) parameter<θ<

    Creation

    There are several ways to create a ShiftedExponentialDistribution probability distribution object:

    • Create a distribution with specified parameter values using makedist.

    • Fit a distribution to data using fitdist.

    • Interactively fit a distribution to data using the Distribution Fitter app.

    Properties

    expand all

    Distribution Parameters

    Mean of the unshifted exponential distribution, specified as a positive scalar value. The mean of the shifted exponential distribution is the sum of mu and theta.

    Data Types: single | double

    Location (threshold) parameter for the shifted exponential distribution, specified as a numeric scalar value.

    Data Types: single | double

    Distribution Characteristics

    This property is read-only.

    Logical flag for a truncated distribution, represented as 0 or 1. If IsTruncated is 0, the distribution is not truncated. If IsTruncated is 1, the distribution is truncated.

    Data Types: logical

    This property is read-only.

    Number of parameters for the probability distribution, represented as a positive integer value.

    Data Types: double

    This property is read-only.

    Covariance matrix of the parameter estimates, represented as a p-by-p matrix, where p is the number of parameters in the distribution. The (i,j) element is the covariance between the estimates of the ith parameter and the jth parameter. The (i,i) element is the estimated variance of the ith parameter. If parameter i is fixed, and not estimated by fitting the distribution to data, then the (i,i) elements of the covariance matrix are 0.

    Data Types: double

    This property is read-only.

    Logical flag for fixed parameters, represented as an array of logical values. If the value is 0, the corresponding parameter in the ParameterNames array is not fixed. If the value is 1, the corresponding parameter in the ParameterNames array is fixed.

    Data Types: logical

    This property is read-only.

    Distribution parameter values, represented as a vector of scalar values.

    Data Types: single | double

    This property is read-only.

    Truncation interval for the probability distribution, represented as a vector of numeric scalars containing the lower and upper truncation boundaries.

    Data Types: single | double

    Other Object Properties

    This property is read-only.

    Probability distribution name, represented as a character vector.

    Data Types: char

    This property is read-only.

    Data used for distribution fitting, represented as a structure containing the following:

    • data – Data vector used for distribution fitting

    • cens – Censoring vector (empty if none)

    • freq – Frequency vector (empty if none)

    Data Types: struct

    This property is read-only.

    Distribution parameter descriptions, represented as a cell array of character vectors. Each cell contains a short description of one distribution parameter.

    Data Types: cell

    This property is read-only.

    Distribution parameter names, represented as a cell array of character vectors.

    Data Types: cell

    Object Functions

    cdfCumulative distribution function
    icdfInverse cumulative distribution function
    iqrInterquartile range of probability distribution
    meanMean of probability distribution
    medianMedian of probability distribution
    negloglikNegative loglikelihood of probability distribution
    paramciConfidence intervals for probability distribution parameters
    pdfProbability density function
    plotPlot probability distribution object
    proflikProfile likelihood function for probability distribution
    randomRandom numbers
    stdStandard deviation of probability distribution
    truncateTruncate probability distribution object
    varVariance of probability distribution

    Examples

    collapse all

    Create a shifted exponential distribution object using the default parameter values.

    pd = makedist("ShiftedExponential")
    pd = 
      ShiftedExponentialDistribution
    
      Shifted (2-parameter) Exponential distribution
           mu = 1
        theta = 0
    
    

    By default, the threshold parameter theta is 0, making the distribution equivalent to the one-parameter exponential distribution.

    Create a shifted exponential distribution object using a scale parameter value of 2 and a location (threshold) parameter value of 1.

    pd = makedist("ShiftedExponential",mu=2,theta=1)
    pd = 
      ShiftedExponentialDistribution
    
      Shifted (2-parameter) Exponential distribution
           mu = 2
        theta = 1
    
    

    Generate 100 random numbers from the shifted exponential distribution.

    r = random(pd,100,1)
    r = 100×1
    
        1.4098
        1.1979
        5.1273
        1.1812
        1.9166
        5.6550
        3.5567
        2.2070
        1.0868
        1.0715
        4.6952
        1.0597
        1.0876
        2.4457
        1.4456
          ⋮
    
    

    Plot a histogram of the random numbers.

    histogram(r)

    Figure contains an axes object. The axes object contains an object of type histogram.

    Version History

    Introduced in R2026b