Questions tagged [distribution]
This tag concerns statistical distributions, their implementations, and properties.
3,038
questions
0
votes
0
answers
21
views
creating a move-object from non-movebank data for spatial analysis via move-package
I need to create a move-object from a large set of telemetric data (>100,000 rows) for e.g. brownian bridge movement modelling. I spent a lot of time today to be sure about the format of the ...
0
votes
0
answers
11
views
How do I find the distribution of my response variable?
I can't find a distribution that fits my photosynthetic yield data or FvFm values (they are between 0.00 and 0.604)
FvFm : num 0.506 0.522 0.528 0.535 0.535 0.534 0.527 0.534 0.534 0.54 0.00 0.600 0....
-1
votes
0
answers
22
views
Biased target variable in a linear regression problem
Could you please answer how should we approach this situation in linear regression problem: The target variable is distributed in a biased manner(50% of the values lie in the range 0-300 and 40% in ...
0
votes
1
answer
28
views
How to bootstrap values from a small non-normal sample size in order to get a confidence interval in R
I have a list of 26 values that are right skewed and have a standard deviation of 22.08. I would like to find the 95% confidence interval for the mean within this data. I believe with a small sample ...
0
votes
0
answers
13
views
How do make a simple 2D ring with GANs?
I am trying to model simple 2d continuous distributions with GANs. Here, I focus on a 2d distribution following a ring structure. The architecture of my networks are:
def make_generator_model(...
0
votes
0
answers
12
views
Different factor graphs from a bayesian network
I was wondering whether it is possible to convert a Bayesian network into several different forms of factor graphs but still hold the same conditional probability from the original Bayesian Network. ...
-1
votes
0
answers
7
views
About the frailty models
All packages deal with frailty models depending on default distribution such as (gamma - log normal- inverse Gaussian). I need to use some of this package but with different distributions not ...
0
votes
0
answers
30
views
Convert a pdf function (truncated) to ppf
I have constructed a pdf function by truncating some extremes so that the minimum and maximum value of the parameter range coincide.
I obtained this curve:
Whereas previously the curve looked like ...
0
votes
0
answers
22
views
Problem with fitting burr distribution in R
I aim to fit burr distribution to my dataset in R, but I get the following error message which does not make sense:
library(fitdistrplus)
library(actuar)
fendo.B <- fitdist(Data3, "burr&...
-2
votes
0
answers
42
views
How to simulate the NHPP in python?
I need help to trasnlate this "R" code to python code:
Tmax<-1000
alpha<-6.64*10^(-4)
beta<- 1.5
Lambda=function(t) alpha*t^(beta)
v=seq(0,Tmax,length=1000)
t=min(v[which(...
2
votes
1
answer
87
views
Convert a tensorflow script to pytorch (TransformedDistribution)
I am trying to rewrite a tensorflow script in pytorch. I have a problem finding the equivalent part in torch for the following line from this script:
import tensorflow_probability as tfp
tfd = tfp....
0
votes
0
answers
48
views
These two pieces of code give different graphs and tell different stories with regards to the numbers and i'm curious as to why [duplicate]
The lines intersect at age 10 here and doesn't go lower than the second 'Survived' line for the rest of the plot.
fig = plt.figure(figsize=(20, 6))
sns.kdeplot(x='Age', hue='Survived', data=train, ...
0
votes
1
answer
26
views
Assign data between n persons in python
I want to assign the data in equal proportion between various people in python automatically. The names should appear in the first column 'Name' automatically.
0
votes
1
answer
53
views
Random Choice with different distributions for each sample
Imagine we want to randomly get n times 0 or 1. But every time we make a random choice we want to give a different probability distribution.
Considering np.random.choice:
a = [0, 1] or just 2
size = n
...
2
votes
2
answers
74
views
Maximise a groups probability of reaching a score within PuLP
Using python, I have a linear programming solution in Pulp which selects 6 players within a budget constraint whilst maximising a specified parameter.
However, I want to be able to maximise a ...
0
votes
0
answers
17
views
CDF for mixed distribution
I wish to execute the Flood frequency analysis (magnitude at the selected return period) using a mixture of two extreme distributions. In my case, I wish to attempt a mixture of GPA and Lognormal 3P. ...
0
votes
1
answer
41
views
Allocate elements in python list with specific probobility
Assume, I have a specific proportions of slots proportion = [30,30,20,10,10]and I want to feed it with 1 element and get it allocated one by one. For example, we start with [0,0,0,0,0] and add 1 we ...
2
votes
1
answer
50
views
What does {ggdist}'s stat_interval levels calculate (I thought it was confidence intervals but they're not correct)?
I'm using ggdist (which is awesome) to show variability within a sample. I have a series of means, SDs, and std.errors and I want to use the stat_interval() function to show the 50%, 80%, 90%, and 95% ...
-1
votes
0
answers
28
views
is there a way to generate data with gamma distribution within specific range?
I trying to simulate cost of insurance claims data using a gamma distribution. I need to generate a data for 2 million records and with minimum value of 1000 and max of 1000000 which fits exactly as ...
0
votes
1
answer
34
views
How to draw heatmap based on density map
Im trying to draw a heatmap from a given distribution. Ex, a normal distribution of a 2D array will look like this:
If i have another density graph like this:
How can i draw a heatmap that look like ...
0
votes
1
answer
16
views
Selecting random ROUND number without being non-even distribution
So I want to make a number selector in JS that select a ROUND number between 1 and 100. Like selecting a winning ticket for example.
I found out I could use a function and then Math.round, like this
...
0
votes
1
answer
85
views
How to simulate a Non-Homogenous Poisson Process?
I tried to simulate the NHPP in python. The function works but the numbers simulated don´t follow the NHPP.
The code is:
def nhpp(parametros,T,N):
numeros=list()
# the function of rate λ(t) ...
0
votes
0
answers
25
views
How to apply best fit distributions in pyspark?
I currently working on a migration from python to pyspark,and I have one step where I find the best fit distribution using a modified function of Fitting empirical distribution to theoretical ones ...
0
votes
0
answers
50
views
Weighting the seaborn histplot probabilities when viewing multiple distributions
I am plotting four distributions using seaborn histplot. I can view the bin probability for each distribution but would like to reweight these probabilities so the total sum of probabilities across ...
0
votes
0
answers
11
views
Estimating Composite Lognormal Pareto type II (using Compdist package in R)
I try to estimate parameter using composite lognormal pareto type II in R. And I got stuck in parameter. this is my code :
par<-list()
distvec<-c("lnorm","pareto2")
par[[1]]&...
-1
votes
1
answer
67
views
Why the histogram look different using two different breaks argument in R?
I want to plot the distribution of the datasets using the histogram in R. I tried using different arguments (default, Freedman-Diaconis, and Scott) to get the best representation. I consider using a ...
1
vote
1
answer
42
views
Clustering discrete distributions in Python?
My dataset is composed of records of music streamings from users.
I have around 100 different music genres and I would like to cluster them depending on the distribution of ages of listeners.
To be ...
0
votes
0
answers
33
views
Splitting number of clients into 3 equal intervals
I have a question regarding the splitting by a particular dimension the number of clients into 3 equal intervals. I would like to split the number of values in the 'N' column (representing the number ...
2
votes
1
answer
69
views
T distribution formula for Percent Point Function
I used python scipy library to get the ppf value. I am trying to calculate the ppf in c++ without using python. I went through many articles online but couldn't find one. Can any one help me to get ...
1
vote
0
answers
34
views
Adding distribution-specific functions to scipy.stats.rv_frozen
I'm trying to implement some inventory models in python. We're using the Gamma distribution from scipy.stats for the lead time demand distribution for each part. The service level metrics for these ...
1
vote
1
answer
51
views
Seeded RNG in Distributions.jl
I have a module with functions where I need to ensure that all functions use the same random values. I currently have two solutions, resetting the seed at each call:
using Distributions
function ...
2
votes
1
answer
45
views
Why `x` is now the mixture of these five gamma distributions from the following R code?
I try to sample from the following mixture models of gamma distribution:
enter image description here
The R code is as follows:
The algorithm can be translated into a vectorized approach.
Step 1: ...
0
votes
0
answers
24
views
How to get the Sigma of a Rayleigh distribution in python scipy.stats
Calling
rayleigh_args = stats.rayleigh.fit(num_list)
Returns a tuple of 2 values e.g. (-320.34, 360.77).
Where I can use it to get the CDF or PDF of the distribution for a given value.
I can't find ...
0
votes
1
answer
58
views
Saving data into Ignite Cluster is not distributed evenly
I am working on a use-case to store the data in an in-memory database and enable it to BI for analytics.
My main objective is,
Cache data in Ignite, if the data is more than available heap size, ...
1
vote
1
answer
37
views
Fit negative binomial to zero-truncated (positive only) data
I just learned that MASS::fitdistr, when fitting a negative binomial, is sensitive to the number of zeroes... a bummer since I was hoping to fit this distribution to count data of species where the ...
0
votes
0
answers
12
views
Precondition analysis
I would like to know whether I need to test every variable on its distribution and outliers or just the metrical variables? I mean does it make sense to test nominal variables on these aspects?
Thanks ...
0
votes
0
answers
15
views
how to find parameter of the exponential distribution with bayes
i have an list of values after use np.random.exponential(alpha).
[1.4066,1.2917,1.4080,4.2801,1.2136,2.7461,11.1076,0.9247,5.8833,10.2513,3.8285,3.2116,0.5451,0.9896,1.1602,7.7723,0.1702,0.8907,0.2276,...
2
votes
2
answers
53
views
Different ways to trim the mean with different results
Suppose I want to calculate the trimmed mean of the following data:
set.seed(1)
s<-rnorm(10,100,20)
#[1] 87.47092 103.67287 83.28743 131.90562 106.59016 83.59063 109.74858 114.76649 111.51563 ...
0
votes
1
answer
34
views
Sample conditional distribution for three variables
I would like to create a setup where the dependent variable y and two explanatory variables x and z with specified conditional correlations r_yxand r_zx and r_yz that I can vary myself.
r_yx <- 0.9
...
-2
votes
1
answer
42
views
Distribution of 2 lists randomly to another 2 lists
I have two lists A and B
,
and P1,P2
and I need to take A,B and randomly distribute them to lists P1,P2
A = [ A1,A2,A3,A4 = "A1","A2","A3","A4" ]
B = [n101,...
3
votes
1
answer
46
views
Generating random samples from geometric distribution in python
I want to generate random sample from geometric distribution using python.
I was using the numpy.random.geometric(p=0.3, size=100) function. But I later realized that this function generates sample ...
0
votes
0
answers
21
views
Hilbert Marginal Spectrum and Arbitrary Statistical Moments in Python
I am using the emd python package to compute the IMFs of some data. Now, I want to compute the Hilbert marginal spectrum according to this equation:
and in general something like this
for an ...
0
votes
0
answers
39
views
Ploting seaborn subplots histograms with different row values [duplicate]
Thanks everyone for the advice! editing my original question here:
Say that I have a dataset and my column 'operator has 4 different values. Then, I want to create 4 different scatterplots visualizing ...
0
votes
0
answers
49
views
How can I create a distribution in Python using Min, Max, Mean and Standard Deviation?
As the title states, I am trying to create a distribution in Python to be used in Monte Carlo simulations. I have the Minimum and Maximum values, as well as the most likely value and the Standard ...
0
votes
1
answer
29
views
Is Netlogo implementation of rngs:rnd-negbinomial getting the wrong results?
I'd like to use the negative binomial distribution to assign values to turtles, but the outcome seems not to be correct.
In my model I'd like to assign values with the negative binomial distribution ...
0
votes
0
answers
11
views
Extracting statistical parameters from a mixture of two distributions of different kind
I have a dataset b (as a list in Python) of length 100 I know that is amounts to the mixture of two distributions:
A normal distribution
A uniform distribution
See:
I would like to extract the
...
0
votes
1
answer
28
views
Can't distribute items between arrays
Imagine you have a list of objects. Each object looks like:
{'itemName':'name',
'totalItemAppearance':100,
'appearancePerList': 20}
and some number X which stands for number of lists that can ...
0
votes
0
answers
61
views
Distribution & -- the most intense point(s) in the fluctuation of frequency
Given that a confidence interval is a vector (of standard deviation), amplitude in itself is the change of a vector (its direction) .. plus amplitude & frequency are correlated (but herein not ...
0
votes
0
answers
88
views
How to plot figure for KS test
I have two arrays with different sizes I can easily find out the KS statistics using scipy.stats.ks_2samp. But how can I draw CDF like the picture?
0
votes
0
answers
23
views
Plotting lognormal distribution with my data, instead of randomly generalized data
I am new to Python and statistics, and I have a problem.
I have a random variable X whose values fall under a three-parameter lognormal distribution. I would like to plot the PDF of my variable.
X ...