Menu

#174 package distrib: mode for each known distribution

open
nobody
5
2022-09-26
2022-06-14
No

Package distrib already has a function to return the mean for each known distribution (normal, Poisson, etc.) given the parameters for the distribution. It would be convenient to have the mode as well.

Some distributions don't have a simple mode (e.g., a uniform distribution), or have multiple modes (e.g., binomial for some choices of parameters). Not sure what to do in those cases.

Discussion

  • Raymond Toy

    Raymond Toy - 2022-09-25

    Perhaps it would be good enough to define a mode function just for the PDFs that have a single value. Or maybe if there are a finite number of values, just return a list of the values. Perhaps the uniform pdf can just signal an error?

     
  • Robert Dodier

    Robert Dodier - 2022-09-26

    Yeah, if a single number, return that, if a list, return the list, if not a finite list, then report an error -- that all makes sense to me.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.