### Aptech Systems, Inc. Worldwide Headquarters

Address:

Aptech Systems, Inc.

2350 East Germann Road, Suite #21

Chandler, AZ 85286Phone: 360.886.7100

FAX: 360.886.8922**Ready to Get Started?**### Request Quote & Product Information

### Industry Solutions

### Products

### Resources

### Support

### Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

### Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

### What’s New in GAUSS 17

### Want to find out more?

### Have a Specific Question?

### Q&A: Register and Login

### Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

### User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!

### Where to Buy

Available across the globe, you can have access to GAUSS no matter where you are.

### Recent Tags

applications character vectors CML CMLMT Constrained Optimization datasets dates dlibrary dllcall econometrics Editor error error codes error handling errors Excel file i/o floating network GAUSS Engine GAUSS Light graphics GUI hotkeys installation license licensing linux loading data loop loops matrix manipulation Maximum Likelihood Maxlik MaxLikMT Memory multidimensional array optimization Optmum output PQG graphics procs random numbers strings structures threading### Recent Questions

### Features

### Time Series 2.0 MT

### Industry Solutions

### Find out more now

### Time Series MT 2.1

### Find out more now

### Find out more now

# Resources

# pdfexp, cdfExp

i´m lost in the use of pdfExp(x,a,m), cdfExp(x,a,m). Given that the exponential is iqual to:

What are the location and mean parameter?

For the cdfexp you said that it´s iqual to:

qthelp://aptech.com.gauss.13.0/doc/Equation40.png

I don´t see any m there?

How can I have the same values than Matlab whith his expcdf and exppdf functions?

Thank you.

## 1 Answer

The `pdfExp` and `cdfExp` in GAUSS calculate the two parameter exponential function. This is documented more clearly and accurately in the latest version of GAUSS.

For easy comparison, I will show a few different parameterizations in GAUSS code. First, the single-parameter exponential function with a rate parameter called `lambda`. This is the one which you posted above.

val = lambda * exp(-lambda * x);

Second, the single-parameter exponential function with a scale parameter `beta`. This scale parameter is the reciprocal of the rate parameter.

val = (1/beta) * exp(-x/beta);

Finally, the two-parameter exponential function with a scale parameter `beta` and a threshold parameter (or location parameter in a sense) `theta`. This is the function in GAUSS.

val = (1/beta) * exp(-(x - theta)/beta));

To calculate the single-parameter exponential function in GAUSS, you will always set the second input equal to 0. If you are thinking of the distribution in terms of the rate parameter, `lambda` then you will pass in the final value as the `1/lambda`. Here are some examples:

//x = 1.2, lambda = 0.5 val_1 = 0.5 * exp(-1.2*0.5); //x = 1.2, beta = 2 val_2 = 1/2 * exp(-1.2/2); //x = 1.2, beta = 2, theta = 0 val_3 = 1/2 * exp(-(1.2 - 0)/2); //x = 1.2, beta = 2, theta = 0 val_4 = pdfExp(1.2, 0, 2);

For each of these the answer should be: 0.27440582.

## Your Answer

## 1 Answer

The `pdfExp` and `cdfExp` in GAUSS calculate the two parameter exponential function. This is documented more clearly and accurately in the latest version of GAUSS.

For easy comparison, I will show a few different parameterizations in GAUSS code. First, the single-parameter exponential function with a rate parameter called `lambda`. This is the one which you posted above.

val = lambda * exp(-lambda * x);

Second, the single-parameter exponential function with a scale parameter `beta`. This scale parameter is the reciprocal of the rate parameter.

val = (1/beta) * exp(-x/beta);

Finally, the two-parameter exponential function with a scale parameter `beta` and a threshold parameter (or location parameter in a sense) `theta`. This is the function in GAUSS.

val = (1/beta) * exp(-(x - theta)/beta));

To calculate the single-parameter exponential function in GAUSS, you will always set the second input equal to 0. If you are thinking of the distribution in terms of the rate parameter, `lambda` then you will pass in the final value as the `1/lambda`. Here are some examples:

//x = 1.2, lambda = 0.5 val_1 = 0.5 * exp(-1.2*0.5); //x = 1.2, beta = 2 val_2 = 1/2 * exp(-1.2/2); //x = 1.2, beta = 2, theta = 0 val_3 = 1/2 * exp(-(1.2 - 0)/2); //x = 1.2, beta = 2, theta = 0 val_4 = pdfExp(1.2, 0, 2);

For each of these the answer should be: 0.27440582.