Questions tagged [empirical-distribution]

20 questions
3
votes
1 answer

Graph of empirical and theoretical distributions for Zero Inflated Poisson Distribution

Following is a kind of data set I am working on it: data <- c(0, 1, 0, 11, 2, 0, 3, 0, 0, 2, 1, 3, 1, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 8, 1, 1, 1, 0, 1, 1, 2, 7, 0, 0, 0, 5, 2, 3, 6, 1, 1, 5, 2, 9, 0, 0, 1, 21, 16, 2, 9, 6, 25, 2, 1, 12, 16, 14, 15,…
2
votes
1 answer

How to invert the estimate of a function with multiple inputs, but only invert the function for a single input

I am trying to invert a function like one would invert an empirical cdf. If I wanted to invert an empirical cdf, I would write something like, tau = 0.8 y=rnorm(1000,1) [f,x]=ecdf(y) q = interp1(f,x,tau,'next'); Instead, suppose that I have defined…
shmiggens
  • 145
  • 3
2
votes
1 answer

Efficient Empirical Distribution Calculation

Consider empirically estimating the conditional distribution discrete in both X and Y, Pr(Y|X) Both variables have been mapped to integer sets such that X in {1, ..., N_X} and Y in {1, ..., N_Y} I have a dataframe of observations obs, such that…
rwolst
  • 12,904
  • 16
  • 54
  • 75
2
votes
1 answer

Efficient computation of bivariate empirical cdf in R/Fortran

Given an n*2 data matrix X I'd like to calculate the bivariate empirical cdf for each observation, i.e. for each i in 1:n, return the percentage of observations with 1st element not greater than X[i,1] and 2nd element not greater than…
David
  • 143
  • 9
2
votes
1 answer

Calculating confidence intervals from the empirical distribution obtained with the bootstrap method

I have calculated the empirical distribution of the sample mean using the bootstrap method, but now I would also need to calculate the confidence interval for the population mean using the empirical distribution I found. Is there a way to do it…
nbro
  • 15,395
  • 32
  • 113
  • 196
1
vote
1 answer

Truncated Poisson vs Hurdle model: why different values?

I want to do a regression with count data model, where doctor visits is the dependent variable. I did a two-part model with first a probit model for no doctor visit at all or one or more and then a Poisson model for at least one doctor visit. After…
DaS
  • 11
  • 2
1
vote
0 answers

Wasserstein distance between two distributions python

I have distributions of some data pre and post an event occurrence. I want to find the distance between these two distributions. To put it differently, how much would I need to scale pre-event distribution to come close to the post-event…
1
vote
1 answer

Generate empirical/user defined distribution with desired mean and std

I have generated a demand distribution based on the actual demand data of one year. This distribution is non-normal or similar to any theoretical distributions. I use this empirical demand distribution for a simulation study. In current empirical…
1
vote
0 answers

predict empirical probability distribution shift

I'm looking into creating a simulation for passengers that arrive at a bus stop at a specific time of the day. I do this by drawing from a created probability distribution function. From measurements on bus ticket sales over the last 2 months I have…
Blob911
  • 139
  • 2
  • 10
0
votes
1 answer

Empirical Cumulative Density Function - R software

I have a problem with plotting ECDF. I try to reverse the x axis value like 1-(the function). Because I wanna have smaller in the beginning of the graph and decreasing like in my reference graph. load("91-20.RData") ts <-…
0
votes
1 answer

Why does "emd" get imported but not "EMD"?

I'm trying to import EMD from the PyEMD package. But I'm facing a peculiar issue. When I write everything in small-case i.e. "emd" & "pyemd", it works but as per the desired case i.e. "EMD" & "PyEMD", it doesn't work. !pip install pyemd from pyemd…
0
votes
1 answer

How to scale X of plot in Python?

I have the following code that builds the empirical function according to data stored in Z_score_list. Z_score_list.sort() edf = [] step = 1 / len(Z_score_list) for i in range(len(Z_score_list)): edf.append(step * i) edf =…
Arzental
  • 103
  • 6
0
votes
0 answers

Empirical Distribution Function in Python better ways or formuals

I want to know if there is a better, more accurate ECDF in python (for a single vector) or in general to use than mine. this is my current - x = np.sort(X) y = np.arange(1, len(x) + 1) / float(len(x))
Tal Bar
  • 5
  • 2
0
votes
0 answers

R - Calculate probability that a point has been drawn from an empirical multivariate distribution

I collected data (5 variables) for 1000 items. #example data (my data is not neccesarily multivariate normal!) data <- rbind(c(7.2, 9, 14.1, 22.3, 3.9), cbind(x1=rnorm(999,10,1), x2=rnorm(999,8,0.2), x3=rnorm(999,12.4,1.2),…
Anti
  • 365
  • 1
  • 14
0
votes
1 answer

Plotting a CDF from a multiclass pandas dataframe

I understand the package empiricaldist provides a CDF function as per the documentation. However, I find it tricky to plot my dataframe in the column has multiple values. df.head() …
arilwan
  • 3,374
  • 5
  • 26
  • 62
1
2