0

I have an array with a certain number of realizations of a test.

I need to plot the PMF given my realizations

I've read this Q&A but I think in my case, to build the PMF I first need to find the frequency so the values ​​fall within a certain range (like [-1,0],[0,1], etc) but I can't figure out how to do it in a fast way.

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
NicoCaldo
  • 1,171
  • 13
  • 25
  • I could have found the solution which is `histogram(X,'Normalization','pdf')` but not sure yet – NicoCaldo Mar 29 '20 at 09:03
  • You may wan to provide a [minimum valuable example](https://stackoverflow.com/help/minimal-reproducible-example). *chi-square* is a probabilistic test and has nothing to do with random variables – max Mar 29 '20 at 10:09
  • Yeah sorry, I may have used the wrong words but, I've found the solution – NicoCaldo Mar 29 '20 at 10:28

1 Answers1

1

In my case, the solution was to use the command

histogram(X,'Normalization','pdf')

which plot what I was looking for; X is my column vectors containing the realizations

NicoCaldo
  • 1,171
  • 13
  • 25