Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Number of bins in histogram

    Dear users,

    I have a variable with 9 discrete values (0,1,2,…,8) & 700000 observations.

    70% are 0s, & and % decreases as move towards 8.

    My query is:

    Is there some consensus on keeping number of bins for histogram & density plots. In may case as the number of bins change the shape of distribution plots also changes.

    thank you!
    Last edited by Mukesh Punia; 19 Jan 2024, 15:02.
    Best regards,
    Mukesh

    (Stata 15.1 SE)

  • #2
    I can't give a general answer to your question, but with only 9 discrete values in the variable, I think nearly everyone would agree that you should use 9 bins!

    Comment


    • #3
      Thank you, Clyde Schechter, for quick response.
      Last edited by Mukesh Punia; 19 Jan 2024, 15:17.
      Best regards,
      Mukesh

      (Stata 15.1 SE)

      Comment

      Working...
      X