0

I know you can create a binomial Experiment with the Code

tenCoinFlips <- rbinom(10000,10,0.5)

But how can you calculate the PDF of this experiment. I know Dbinom will give you the exact PFD but is there a way to calculate the empirical PDF of an experiment?

Drew Mash
  • 31
  • 2
  • 1
    You mean like was the the observed proportion of each outcome? do `table(tenCoinFlips)/length(tenCoinFlips)` – MrFlick Apr 06 '19 at 04:27
  • I tried that but adding all those up gives a number greater then 1 which would be impossible, I meant getting the probability density if that helps – Drew Mash Apr 07 '19 at 22:57
  • I should have typed sum() rather than length(). My bad. – MrFlick Apr 07 '19 at 23:10

0 Answers0