Questions tagged [exponential-distribution]

Anything related to the exponential probability distribution, i.e. a continuous probability distribution whose probability density function is a one-sided decreasing exponential function.

Anything related to the exponential probability distribution, i.e. a continuous probability distribution whose probability density function is a one-sided decreasing exponential function:

f(x) = ke-kx    if x >= 0

f(x) = 0          if x < 0

where k is a constant.

See Wikipedia page on the exponential distribution.


Tag usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

103 questions
68
votes
9 answers

Pseudorandom Number Generator - Exponential Distribution

I would like to generate some pseudorandom numbers and up until now I've been very content with the .Net library's Random.Next(int min, int max) function. PRNGs of this variety are supposed to be using a Uniform distribution, but I would very much…
11
votes
2 answers

How to generate random numbers with exponential distribution (with mean)?

I am trying to generate exponentially distributed random number with mean equal to 1. I know how to get random number for normal distribution with mean and standard deviation. We can get it by normal(mean, standard_deviation), but I don't know how…
Sadiksha Gautam
  • 5,032
  • 6
  • 40
  • 71
9
votes
2 answers

Exponential distribution in Python

What's the easiest way to draw a random number from an exponential distribution in Python?
Jake
  • 283
  • 2
  • 8
  • 14
5
votes
1 answer

How to Plot an exponential distribution of spike times over a histogram of them, in R?

So my question follows the development after my last one. I have been trying to work on getting the spike times as a rastor plot for a spike train. I took a firing rate of 100 and got spike train for 20 trials: The code for that is: fr = 100 dt =…
5
votes
4 answers

Random number generator that generates integers for Java

I want to generate some random integers in Java, but this according to some distribution laws. More specific: I want to generate some random integers for gaussian distribution. I found out only generators which return double results for the…
som86
  • 61
  • 4
4
votes
1 answer

Exponential distribution simulation in R

I have the following graph: I am told the following information: (1) vertex A to vertex X is described by an exponential distribution with lambda = 4; (2) vertex A to vertex Y is described by an exponential distribution with lambda = 2.5; (3)…
The Pointer
  • 2,226
  • 7
  • 22
  • 50
3
votes
1 answer

How to fit double exponential distribution using MLE in python?

I am trying to fit a double-exponential (i.e. mixture of two exponential or bi-exp) data using MLE. Though there is no direct example of such a problem, yet I found some hint of using MLE for linear (Maximum Likelihood Estimate pseudocode),…
SCBera
  • 33
  • 1
  • 8
3
votes
2 answers

Does Python's random module have a substitute for numpy.random.exponential?

I've been using Numpy's numpy.random.exponential function for a while. I now see that Python's random module has many functions that I didn't know about. Does it have something that replaces numpy.random.exponential? It would be nice to drop the…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
3
votes
1 answer

Matlab: Chi-squared fit (chi2gof) to test if data is exponentially distributed

I guess this is a simple question, but I can't sort it out. I have a vector, the first elements of which look like: V = [31 52 38 29 29 34 29 24 25 25 32 28 24 28 29 ...]; and I want to perform a chi2gof test in Matlab to test if V is exponentially…
3
votes
2 answers

Random integers from an exponential distribution between min and max

I would like to generate random integers on an interval min to max. For a uniform distribution in numpy: numpy.random.randint(min,max,n) does exactly what I want. However, I would now like to give the distribution of random numbers an exponential…
218
  • 1,754
  • 7
  • 27
  • 38
3
votes
1 answer

How do I tell how good my exponential curve fit is in SciPy?

I fit some data using Scipy: param=expon.fit(data) pdf_fitted=expon.pdf(x,loc=param[-2],scale=param[-1]) plot(x,pdf_fitted,'r') hist(data,normed=1,alpha=.3,histtype='stepfilled') And I get a curve that looks like this: How do I check how good the…
Devinity
  • 377
  • 1
  • 5
  • 17
3
votes
1 answer

Smoothing out of rough plots

I want to draw some plots in Matlab. Details: For class 1, p(x|c1) is uniform for x between [2, 4] with the parameters a = 1 and b = 4. For class 2, p(x|c2) is exponential with parameter lambda = 1. Besides p(c1) = p(c2) = 0.5 I would like to draw…
ARAT
  • 884
  • 1
  • 14
  • 35
2
votes
1 answer

It is possible to create an exponential distribution in netlogo with maximum and minimum values?

Suppose I have X patches, and patches have a patch variable called "patch-quality", with values between 0 and 1. I want to generate a random number between 0 and 1 for that variable following an exponential distribution. When you set up an…
2
votes
1 answer

Creating random number using Exponential distribution in a specified range?

I need to create random numbers in a user specified range. I understood how to create random numbers and refering to Generating random numbers of exponential distribution that question. However, I need my random numbers to be in a range. I wrote a…
mobiusT
  • 47
  • 4
2
votes
1 answer

Fitting an exponential decay model using SSasymp

I'm modelling the salinity levels in four estuaries in relation to freshwater discharge from a large river (which impacts all 4 estuaries), where each salinity station is being included as a random effect (multiple sensors in each estuary). My df…
Splash1199
  • 379
  • 3
  • 14
1
2 3 4 5 6 7