How to Correctly Model Shares per Computershare Account: Inverse Gaussian Distribution

Rstudio stats ape here. I've been seeing some toilet paper stats surrounding the DRS'd share count. If you really want to figure out the distribution of shares owned you need an Inverse Gaussian Distribution. This type of graph is heavily weighted towards low number x values, in this case number of shares owned. We would expect there to be many thousands of Computershare accounts with only a few shares, and only one or two outliers far out on the x axis in the millions of shares, creating a distribution with a large head and long tail:

https://en.m.wikipedia.org/wiki/Inverse_Gaussian_distribution

https://aosmith.rbind.io/2018/11/16/plot-fitted-lines/

https://www.statmethods.net/advstats/glm.html

https://bookdown.org/ndphillips/YaRrr/linear-regression-with-lm.html


This is how you #might analyze Computershare account data in R with this distribution if it actually mattered what the average shares per account is, which it doesn't, because we don't have enough data and the data we have is biased towards large values.


# This code is untested

library(ggplot2)
library(readr)
library(stats)

# Many accounts have only 1 share, more have two, some have three,........,DFV, Ryan Cohen are last with the most shares

RC_shares <- (the max number of shares in one Computershare account is Ryan Cohen's account)

# Make a numerical vector as the x variable
number_of_shares<- c(1:RC_shares)

# Read in the data you collected on number of shares per account, binned and ordered.
num_accounts <- read.csv("path_to_data.csv")

fit_model <- glm(num_accounts ~ shares_owned, data = shares_owned, family = gaussian(link="inverse"))

summary(fit_model)

# Make a column of predicted values based on the linear model
num_accounts$predlm <- predict(fitlm)

# Plot the histogram with the regression line
ggplot(num_accounts, aes(x=shares_owned)) + geom_histogram(bins = RC_shares-1) + geom_line(aes(y = predlm), size = 1)
  

####Question: Shouldn't this be a Poisson distribution as a Poisson distribution measures discrete values?

####Response: The poisson distribution is:

> "...the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant mean rate and independently of the time

... keep reading on reddit ➑

πŸ‘︎ 83
πŸ’¬︎
πŸ‘€︎ u/glasses_the_loc
πŸ“…︎ Oct 08 2021
🚨︎ report
ETHEREUM: 4 PATTERNS TO THINK. Different possibilities are always plausibles and TA should always be as dinamic as the charts are. I can see 3 options here:Head&shoulders, inverse cup&handle, accumulation/distribution chart and classical sentiment cycle.All of them are bearish right now(pict below) reddit.com/gallery/no6bf8
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/usulwalker
πŸ“…︎ May 30 2021
🚨︎ report
This Mumbai map shows the distribution of vegetation in Mumbai city, alongside the graph which presents an inverse correlation of mean surface temperature and vegetation by ward.
πŸ‘︎ 111
πŸ’¬︎
πŸ“…︎ Nov 17 2020
🚨︎ report
Inverse CDF of normal distribution

How do I calculate inverse of the normal cumulative distribution function?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/statslut773
πŸ“…︎ Mar 04 2021
🚨︎ report
What do you think would happen if the distribution of wealth were to be inverse? A world, where the poorest person will become the richest and the richest the poorest...?
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Only_Klasiks
πŸ“…︎ Dec 11 2020
🚨︎ report
[Q] Inverse binomial distribution?

Not sure if this exists, but I was wondering if there is a way to model essentially the opposite of a binomial distribution. Suppose we have an event with probability p that we want to happen n times. I would guess the minimum would be n and the mode would be n/p, but beyond that, how would you model the probability of it taking x trials to get p to happen n times?

πŸ‘︎ 33
πŸ’¬︎
πŸ‘€︎ u/Rubixninja314
πŸ“…︎ Jul 11 2020
🚨︎ report
I have never seen the like before. I searched IMDb for 20 or so minutes to find another example of this inverse normal distribution. Let's just say that the game is divisive, but most people (68% from a rating of 8 and up) like it. Can you find another game, movie or TV series that's like this?
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/krokknoff
πŸ“…︎ Jul 08 2020
🚨︎ report
Inverse cdf of a mixture distribution

It is known that we have F = pF1 + (1-p)F2 for a mixture distribution F with probabilty p. However, is it the case that the inverse of the mixture CDF also F^-1 = pF1^-1 + (1-p)F2^-1 ?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/ADDMYRSN
πŸ“…︎ Oct 18 2020
🚨︎ report
Use inverse matrix gamma distribution as prior for covariance matrix of multivariate normal (in Python)

Hi, I'm trying to reimplement the Bayesian model from this paper. They mention in the Supplemental Information that they assume a multivariate prior on the weights -- I know how to deal with the mean vector, but they say that "The covariance matrix is defined by an Inverse-Gamma distribution with the two hyperparameters (a, b). The simulation sets the initial values of the two hyperparameters as (a0 = 1, b0 = 5)." I'm trying to do this in PyMC3, and I don't see how to define the covariance matrix with this distribution (is the inverse-wishart really what I want?)? I would also give PyStan a shot if someone knew how to do this there. This is my first foray into Bayesian modeling, so any help would be hugely appreciated.

πŸ‘︎ 37
πŸ’¬︎
πŸ‘€︎ u/squirreltalk
πŸ“…︎ Jun 09 2019
🚨︎ report
I am a complete newbie to statistics: Could somebody please explain how this y axis is being scaled? This is an inverse normal CDF distribution.
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/Melodia500
πŸ“…︎ Dec 08 2019
🚨︎ report
[Q] Metropolis-Hastings proposal distribution for covariance matrix (with Inverse Wishart prior): resample one element at a time or entire matrix?

Hey stats gang!

Suppose I have a covariance matrix E which I assume is Inverse Wishart with scaling parameter S and degrees of freedom v. I want to perform Metropolis-Hastings sampling on this matrix.

I understand for 1D parameters, an easy proposal distribution is the parameter + a random normal variable. Here, however, I obviously have a (symmetric) matrix rather than a scalar. To generate a proposed covariance matrix E*, do I

  1. Resample the entire covariance matrix all at once? If this is the case, how do I resample so that the proposed matrix is "reasonably close" to the current matrix? OR
  2. Resample each element of the upper triangular part of E (since it's symmetric), treating each element as a scalar to be able to use the "scalar + random normal variable" proposal. If this is the case, do I resample each element to form E* THEN check likelihood with E*, OR do I check likelihood after resampling each element and accept or reject each element? OR
  3. Something else because I'm misunderstanding something?

I hope this question makes sense. Thanks!

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/helloyo53
πŸ“…︎ Mar 12 2020
🚨︎ report
[Q] Confidence intervals from inverse t-distribution

I'm still learning stats so apologies if this is too basic. I am reading a paper on burrowing tortoises that estimates the number of nests by multiplying the mean occupied burrow density of each region in the study area by the total area of each region. Upper and lower confidence intervals (95%) for nest estimates were calculated by multiplying the standard error (SE) by the returned inverse of the t-distribution (df = number of plots) and either adding or subtracting from the total nest estimate.

This method is new to me. For most similar papers I've read, the method for achieving confidence intervals is to use bootstrapping, where a random selection (with replacement) of plots equal to the number sampled in each habitat is taken and a mean occupied burrow density is extracted. The overall mean occupied burrow density standard error and 95% confidence limits is extracted after 10000 repetitions.

I have also seen the delta method used but these are typically older papers.

Is there an advantage to the inverse t-distribution method over bootstrapping? Any incite would be much appreciated!

πŸ‘︎ 17
πŸ’¬︎
πŸ“…︎ Dec 20 2019
🚨︎ report
Can imitation learning/inverse reinforcement learning be used to generate a distribution of trajectories?

I know that it's common in imitation learning for the policy to try to emulate one expert trajectory. However is it possible to get a stochastic policy that emulates a distribution of trajectories?

For example with GAIL, can you use a distribution of trajectories rather than one expert trajectory?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/mellow54
πŸ“…︎ Jan 17 2020
🚨︎ report
BUG: "NORMINV" function returns the inverse of CUMULATIVE normal distribution, the documentation wrongly states it "Returns the value of the inverse normal distribution" without mentioning CUMULATIVE.

To see the cited quotation in the title https://support.google.com/docs/answer/3094022?hl=en

To see that it returns the CUMULATIVE, note the normal distribution is not invertible, and that when you try to values between 0 and 1 in sheets it always works, but others always don't no matter what mean and standard deviation is, so that way I figured it was the cumulative, but it's badly documented.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/santropedro
πŸ“…︎ Feb 09 2020
🚨︎ report
How to generate a random value with a custom distribution from a value between 0...1 using inverse transform sampling programming.guide/generat…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/aioobe
πŸ“…︎ Nov 05 2019
🚨︎ report
Can someone explain to me how to get the Inverse CDF distribution?

So what I understand of the Inverse Distribution, is it is the inverse of the CDF of a distribution. For example, ifΒ X is Exponential Distribution

CDF ofΒ XxΒ isΒ (1βˆ’e^(βˆ’Ξ»x))

So the Inverse of exponential would be

(βˆ’1/Ξ»)ln(1βˆ’X)Β right?

But in the Poisson Distribution, I don't understand how to find the inverse function, since it is not based on anΒ x?

I also do not understand the importance of the Inverse distribution, I guess if given a random number,Β XΒ you can find what the distribution is equal to? But can't you just solve that fromΒ x?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/kvndakin
πŸ“…︎ Oct 13 2018
🚨︎ report
[D] How to normalize data with Inverse Gaussian Distribution?

I am trying to learn some features from a dataset, which, from its histogram, looks like it has inverse gaussian distribution. How can I convert it to a gaussian distribution and normalize it?

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/jiminiminimini
πŸ“…︎ Jan 29 2017
🚨︎ report
On distributions and the inverse Laplacian

Just want a second pair of eyes to check that I got this right.

Say we are looking for the fundamental solution -Lf = d , L = \Delta the Laplacian and d = dirac delta at 0, say dimension is nβ‰₯3. On taking Fourier transforms with s the frequency variable,

we see that 1 = 4pi^(2) |s|^2 F(f) (in the sense of distributions). What one would love to do now is to "divide by 4pi^(2) |s|^2", but strictly speaking (4pi^(2) |s|^2)^(-1) is only L^1_loc instead of e.g. smooth. What we can do however in dimension n>2 is use this to inform an ansatz F(f):=(4pi^(2) |s|^2)^(-1) which on inspection does solve -Lf = d.

The point of being fussy is that the naive division doesn't work in dimension n=2. Here, (or for the multiplier F^(-1)|s|^(n) F), the ansatz takes a different form. Namely,

(Ff , g) = integral (g(x) - g(0))/|s|^n ds for |s|<C + integral g(x)/|s|^n ds for |s|β‰₯C.

For some correct choice of C, this recovers the correct green's function.

Is this right?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Godivine
πŸ“…︎ Jun 28 2018
🚨︎ report
Inverse Gumbel Distribution

I'm trying to use the inverse CDF of the Gumbel Dist. to simulate random numbers. However for the inverse I get mu-xlog(-log(beta)) which spits out imaginary numbers which can't be write. The original CDF is e^-e^(-(x-mu)/beta). And my code is: n=1000 #sample size set.seed(1) #Makes the outcomes reproducable x = runif(n) # simulate n uniform pseudo-random numbers fx = 0-xlog(-log(10)) #Runs the pseudo-random numbers through the inverse CDF

If anyone can tell where I'm going wrong that would be very helpful, thanks.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Ochen1020
πŸ“…︎ Mar 17 2018
🚨︎ report
I need an easy way to find the inverse of a skewed distribution

I often use

Norm.inv(Rand(),mean,st.dev)

I would like to do something similar but I'd like to also set parameters for skewness and kurtosis, so not a normal distribution. A parameter that would allow me to make bimodal/multimodal distributions would also be great!

I have a feeling that there is an appropriate distribution for what I am trying to do, but I haven't figured it out after quite a bit of searching.

Basically what I'm doing is making a random npc generator for a tabletop rpg ,I know there are plenty out there but I'd like to make my own. This distribution will be to determine the total level for a given character. In general, I would like this value to be negatively skewed (many low levels, fewer high levels) but I also wanted the distribution to be unique to each faction (there is a separate sheet for all the faction stats). If I could plug the numbers from the faction sheet into a simple inverse distribution formula, I would be very happy.

TL;DR

I need to do this:

<Distribution>.inv(rand(),mean,st.dev,skew,kurtosis)

or equivalent

thanks in advance

Edit: Gamma has been suggested and just doesn't work for what I am trying to do, my main issue with it is that I can not set skew and kurtosis independently because they are both derived from the alpha value

Skew = 2/alpha^0.5

Kurtosis = 6/alpha

Then there's also

Variance = alpha/ Beta^2

Mean = alpha*beta

I can't set any these parameters independently in gamma.inv

I could indirectly do this. currently my beta = mean/alpha and my alpha = 2/(skew^2). So I am able to pick a skew and a mean, great. Except the problem is that (skew^2) will always be positive, so I can't set a negative skew with this. Also, increasing the skew using this will reduce alpha and increase beta, thus also increasing both variance and kurtosis. So if I want my distribution to be heavily skewed, I'm also making it much more spread out.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/gekosaurus
πŸ“…︎ Nov 09 2016
🚨︎ report
[Probability] If the characteristic function of a distribution is its inverse Fourier Transform, what intuition about or interpretation of the distribution is implied?

I understand that the characteristic function is like the moment generating function, but with guaranteed convergence. (I think - if this is wrong, please break me of that misunderstanding as well!) Are there plans which offer some kind of physical interpretation of this? What does this suggest about "frequency" in probability and "frequency" of a wave? For example, if given a Gaussian distribution in, is it valid to conclude that one is looking at the Fourier Transform of a wave with its largest constituent sinusoid amplitude corresponding to frequency mu (because the probability distribution function reaches its maximum at x = mu)?

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/abig7nakedx
πŸ“…︎ Apr 25 2018
🚨︎ report
t-distribution and inverse t-distribution tables. When to use which?

Hello, just a small question form a statistic nood who is going to a rough time.

What is the difference between these two distributions?

I need to calculate confidence intervals, one professors told me tu use the inverse t-distribution for that purpose but in ebvery book I can only find information about that t-distribution and that it is use to calculate the CI.

I really hope that it makes sense what I wrote and I will be very grateful if somebody could help me out.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Wermikulit
πŸ“…︎ May 22 2017
🚨︎ report
[Basic Statistics] Inverse Distribution Function evaluted at x=0 confusion

So, I'm studying for an exam in statistics, and I stumbled over something considered basic for this course, but hey never be ashamed to ask :).

So i am given a discrete distribution P(X=k) (with k=0,...,3) and the first task was to get F(k)=P(X <= k). For the given discrete distribution I had P(X=0) = 0.3. (Which clearly gives P(X<=0) = 0.3)

Second part was to compute the inverse distribution function F-(u) = inf{x|F(x)>=u} u ranging from 0 to 1.

So F-(0.1) is clearly zero, as F(0) = 0.3 and that is the first F(x) that is greater than 0.1.

However, what is F-(0)? I guess it depends how F is defined, it could be 0 or -infinity. Zero, if a discrete distribution function F is only defined for non-negatives (which I don't think so) and -infinity if it is defined over all of R.

A little help for this missing piece of the puzzle would be greatly appreciated. My attempts to googling the result never resulted in a clear definition of the defined range. I found solutions also suggesting -infinity, but just for the case of the exam coming up, I would appreciate confirmation.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/PhReeKun
πŸ“…︎ Mar 10 2016
🚨︎ report
People's preference when choosing a towel at a restaurant I visited created an inverse random distribution graph
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/extra-dopamine
πŸ“…︎ Jan 20 2018
🚨︎ report
Wikipedia defines the characteristic equation as the inverse Fourier transform of the probability distribution function. Is this correct?

I always thought that this equation was E[exp(jwx)] and that the pdf was the inverse fourier transform of the char equation and not the other way around.

πŸ‘︎ 7
πŸ’¬︎
πŸ“…︎ Sep 29 2013
🚨︎ report
How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions blog.jooq.org/2015/01/06/…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/mariuz
πŸ“…︎ Jan 12 2017
🚨︎ report
How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions blog.jooq.org/2015/01/06/…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/mariuz
πŸ“…︎ Jan 12 2017
🚨︎ report
How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions blog.jooq.org/2015/01/06/…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/mariuz
πŸ“…︎ Jan 12 2017
🚨︎ report
Modified Bessel function and Inverse-Gamma distribution

I have not been able to find a textbook containing a proof of how the characteristic function of an Inverse-Gamma distribution can be derived. In particular, I do not understand how the modified Bessel function of the second kind comes into play. Any suggestion?

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/mtaboga
πŸ“…︎ Jan 08 2012
🚨︎ report
[University Level Psychology Stats] Inverse Distribution

Hi,

I posted up yesterday about some data I am working on where the data for the most part is not meeting normal assumptions. I had checked for outliers (there are non) and I had tried several transformations which did not help.

I have however just ran idf.normal and this seems to fix the data but in my dissertation I would be required to say why I used that transformation.

Does anyone have a paper or book on why this might be a good transformation?

Thank you.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/DarthNarcissist
πŸ“…︎ Mar 27 2015
🚨︎ report
[University Statistics] Distribution of Inverse Gaussian distribution multiplied by a constant

Prove that if X is an Inverse Gaussian distribution IG (mu,lambda) then kX follows an Inverse Gaussian distribution with parameters (kmu, k*lambda)

When I try doing a change of variables in the pdf then I am left with a spare factor of k, everything else seems to match up. I tried also to use the cumulant/moment generating function to prove this briefly but it didn't seem promising.

So my first question is if Z=k*X then is it correct to think that fZ(z)=fX(x/k)? (where fZ, fX are the pdfs of the respective RVs distributions)

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/jay9ayres
πŸ“…︎ Apr 17 2014
🚨︎ report
Metropolis-Hastings proposal distribution for covariance matrix (with Inverse Wishart prior): resample one element at a time or entire matrix?

Hey stats gang!

Suppose I have a covariance matrix E which I assume is Inverse Wishart with scaling parameter S and degrees of freedom v. I want to perform Metropolis-Hastings sampling on this matrix.

I understand for 1D parameters, an easy proposal distribution is the parameter + a random normal variable. Here, however, I obviously have a (symmetric) matrix rather than a scalar. To generate a proposed covariance matrix E*, do I

  1. Resample the entire covariance matrix all at once? If this is the case, how do I resample so that the proposed matrix is "reasonably close" to the current matrix? OR
  2. Resample each element of the upper triangular part of E (since it's symmetric), treating each element as a scalar to be able to use the "scalar + random normal variable" proposal. If this is the case, do I resample each element to form E* THEN check likelihood with E*, OR do I check likelihood after resampling each element and accept or reject each element? OR
  3. Something else because I'm misunderstanding something?

I hope this question makes sense. Thanks!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/helloyo53
πŸ“…︎ Mar 11 2020
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.