0

I have a data set derived from the sport Snooker: https://www.dropbox.com/s/1rp6zmv8jwi873s/snooker.csv

Column "playerRating" can take the values from 0 to 1, and describes how good a player is:

  • 0: bad player
  • 1: good player

Column "suc" is the number of consecutive balls potted by each player with the specific rating.

I am trying to prove 2 things regarding the number of consecutive balls potted until first miss:

  1. The distribution of successes follows a negative binomial
  2. The number of success depends on the player's worth. ie if a player is really good, he will manage to pot more consecutive balls.

I am using the "fitdistrplus" package to fit my data, however, I am unable to find a way of using the "playerRatings" as input parameters.

Any help would be much appreciated!

rasty5
  • 33
  • 5
  • Please help us help you by providing us with a reproducible example (i.e. code and example data), see http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for details. – Paul Hiemstra Jun 10 '13 at 11:17
  • 1
    What question you are trying to answer by "fitting the data"? What are the odds of player scoring considering how often they miss and how likely they will play? – zx8754 Jun 10 '13 at 11:39
  • 1
    @CarlWitthoft, these are supposedly the first 10 rows of his data set. – Arun Jun 10 '13 at 11:42
  • @PaulHiemstra I have edited my question. Does it make more sense now? – rasty5 Jun 10 '13 at 13:27
  • 1
    Does this help: get the mean `playerRating` for each value of `suc` , `for(jj in 1:18) sfoo[jj]<- mean(snook[snook[,3]==(jj-1),2])` ; then `lm(sfoo~I(0:17)` returns intercept and slope `0.510350 0.002649`. From which it may be possible to estimate the binomial coefficients. (or invert that to get lin fit of `suc` as function of `PlayerRating` ) – Carl Witthoft Jun 10 '13 at 15:33
  • @CarlWitthoft, thanks for your help. how do you get the neg bin coeffs from intercept and slope? – rasty5 Jun 11 '13 at 08:36

0 Answers0