0
$\begingroup$

I have a set of data on the size of a group a person is apart of for 100 persons.

member group_size
bob    16
sally  30
jim    5

The size of the group a person can be apart of can be from 1 to 30. It's clear that there's a heavy frequency count around 30. enter image description here

What distribution describes this data? non-negative, discrete values over a range skewed to the left? It seems poisson is always right skewed. My goal is to describe distributions like this in R.

$\endgroup$
11
  • 1
    $\begingroup$ The description seems okay. When you mention Poisson -- I wouldn't expect that a simple parametric model will necessarily be a good description. Do you need to choose a distributional model for some purpose? $\endgroup$
    – Glen_b
    Oct 21 '19 at 14:11
  • $\begingroup$ @Glen_b This is a simple distribution - lots of observations at high discrete values, surely there must be a simple distribution to describe this? I want to generate random numbers that pull from similar distributions. I come across similar data on a frequent basis. $\endgroup$
    – PDog
    Oct 21 '19 at 14:18
  • 2
    $\begingroup$ Why not just draw randomly from your sample? $\endgroup$ Oct 21 '19 at 14:22
  • $\begingroup$ I want to generate random numbers that pull from similar distributions. I come across similar data on a frequent basis. $\endgroup$
    – PDog
    Oct 21 '19 at 14:28
  • 1
    $\begingroup$ @silly No binomial distribution for $n=30$ values can look like this. The reason why is they all have clear modes (with decaying probabilities on both sides) except for parameter values $p$ outside the range $[1/30,1-1/30]:$ but then their probabilities are concentrated within the most extreme four values or so. Truncating a suitable hypergeometric distribution might work, but that's just guessing: in most applications it's much more important that one choose a distribution suitable for the assumed data-generating process, about which we have been told nothing so far. $\endgroup$
    – whuber
    Oct 21 '19 at 16:56
1
$\begingroup$

Graphical comment: It might help to know the mean and standard deviation. And to know the reason for what appears to be an artificial maximum of 30.

The idea here is to use the lower tail of a suitable distribution. I chose negative binomial. R code dnbinom is a negative binomial PDF. Just taking the first few probabilities (0 through 30) gives a suitable shape, but of course doesn't add to 1.

In R:

x = 0:30; pdf=dnbinom(x, 30, .4)
plot(x, pdf, type="h")
sum(pdf)
[1] 0.07462369  # So this is a lower tail

enter image description here

Then divide by the total of these few probabilities to get a proper PDF that sums to 1.

x = 0:30; pdf=dnbinom(x, 30, .4)
PDF = pdf/sum(pdf)
plot(x, PDF, type="h")> 
sum(PDF)
[1] 1

enter image description here

This is just an experimental run. A distribution other than negative binomial may have a lower tail with a more suitable shape.

$\endgroup$
2
  • 1
    $\begingroup$ Your post will be understandable only to those conversant with R. Thus, it would help to explain what dnbinom does and how your calculations use it to generate a "pdf" (although presumably it's a probability function, not a probability density function). $\endgroup$
    – whuber
    Oct 21 '19 at 17:32
  • 1
    $\begingroup$ @whuber. Thanks. Not intended as a final solution to the problem. But I have added some text to give non-R users a clue what I'm trying. $\endgroup$
    – BruceET
    Oct 21 '19 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.