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
0
votes
3 answers

Loop in a dataset simulation

I hope to get help on the following problem in R. I have the folowing code to generate 30 column dataset based on an exponential distribuition: x0=0 xmax=8000 xout=3000 lambda=0.0002 n=1 x1=x0+rexp(n,lambda)-xout x2=x1+rexp(n,lambda)-xout …
Sthln
  • 71
  • 6
0
votes
0 answers

Exponential distribution in Java not right - values too small?

I am trying to generate an exponential distribution for arrival and service times of processes. In C++, the example I have works fine and generates pseudo-random numbers in the range [0, inf) and some are bigger as expected. In Java, it does not…
Boris
  • 566
  • 5
  • 21
0
votes
2 answers

Exponential distribution in R

I want to simulate some data from an exp(1) distribution but they have to be > 0.5 .so i used a while loop ,but it does not seem to work as i would like to .Thanks in advance for your responses ! x1<-c() w<-rexp(1) while (length(x1) < 100) { …
nnisgia
  • 37
  • 5
0
votes
1 answer

Binning an unevenly distributed column in R

I have to a column in R which has uneven distribution like an exponential distribution. I want to normalize the data and then bin the data in subsequent buckets. Saw following links which helps in normalizing the data but nothing with binning the…
Rahul Agarwal
  • 4,034
  • 7
  • 27
  • 51
0
votes
2 answers

How do I use the rug function for an exponential distribution in R?

I am just starting out in R. I want to plot interval of times (the distribution is exponential) on x axis, with a tick mark in place every time the interval ends. If I have a string of times say (0.2, 0.8, 0.9 , 1.0) then the tick marks on the x…
14thTimeLord
  • 363
  • 1
  • 14
0
votes
1 answer

Create random number with exponential distribution in c++ (visual stduio)

I am trying to create random number with exponential distribution. When I tested with a simple example, it worked well. But when I create it in my project, it does not work. My project include many classes with different objects. A class in my…
nguyennd
  • 55
  • 1
  • 11
0
votes
2 answers

Poisson arrivals and exponential inter-arrival times

In Matlab, I want generate events that follow Poisson arrivals and the inter-arrival time between events to be exponentially distributed? Which command should I use ?
aziz
  • 17
  • 3
0
votes
1 answer

how to estimate parameters of mixture of 2 exponential random variables (ideally in Python)

Imagine a simulation experiment in which the output is n total numbers, where k of them are sampled from an exponential random variable with rate a and n-k are sampled from an exponential random variable with rate b. The constraints are that 0 < a ≤…
0
votes
3 answers

Generating random numbers in java such that they average to a particular value

I am thinking of using an exponential distribution for this random number generator and If i am generating about a 100 numbers, it should average to a particular value say 7.5. How do I go about this?
Sab
  • 75
  • 2
  • 9
0
votes
1 answer

Fill an array with random numbers within a specific range using exponantial distribution

int[] r = new int[1000]; ExponentialDistribution exp = new ExponentialDistribution(4.0); for(int i = 1; i
0
votes
2 answers

add exponential function given mean and intercept to cdf plot

Considering the following random data: set.seed(123456) # generate random normal data x <- rnorm(100, mean = 20, sd = 5) weights <- 1:100 df1 <- data.frame(x, weights) # library(ggplot2) ggplot(df1, aes(x)) + stat_ecdf() We can create a general…
lukeg
  • 1,327
  • 3
  • 10
  • 27
0
votes
2 answers

how does (int)exp.sample() work in the code?

ExponentialDistribution exp = new ExponentialDistribution(4.0); for(int i = 1; i < 20; i++){ timestamp[i] = (int)exp.sample() + 1+timestamp[i-1]; Here timestamp is an array of integers and a random value is assigned to it with…
0
votes
1 answer

Generate a exponential distribution with lambda=3

I have an assignment and now got confused about exponential distribution. The instructions say "service time is exponential distributed with intensity lambda = 3." First I thought generating this is just exp(3), but using Matlab I am wondering if…
Orongo
  • 285
  • 1
  • 6
  • 16
0
votes
1 answer

Find the best fitting distribution using excel

I estimated the theta of exponential distribution and the theta and tau of weibull distribution. I want to compare the two distribution to see which one is the best fitting of my data. How can i do that in excel? Can i find the R squared value in…
Lok Wong
  • 1
  • 4
0
votes
1 answer

Bounded exponential random number Java

I want to generate random numbers on bounded exponential distribution in Java but the formula x = log(1-u)/(−λ) (Here u is a uniform random number between [0,1) ) does not generate bounded exponential random number. Please let me know how can I…
user2358262
  • 257
  • 3
  • 13