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.

85 questions
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
  • 4
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
  • 3,743
  • 6
  • 24
  • 40
0
votes
2 answers

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

I am just starting out in R and again, apologies if my question is very basic. 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…
TimeLord
  • 171
  • 13
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
  • 8
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
  • 55
  • 1
  • 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,247
  • 2
  • 10
  • 24
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
  • 3
  • 14
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
  • 197
  • 2
  • 11
0
votes
1 answer

Generate on/off signals of random duration SIMULINK

For my SIMULINK model I need to generate a signal that takes the values 1 or 0. To generate it I need to draw a number from a an exponential distribution and use this number as the time the signal stays in 0. Once this time has passed, I have to…
c_david
  • 637
  • 1
  • 8
  • 13
0
votes
0 answers

R: combination of multivariate normal and exponential distribution

I have a set of 7 parameters with high correlation and I need to be able to extract randomly generated sets. However, my variables do not all follow a multivariate normal distribution. I've plotted the distribution of the parameters below where you…