0

We have some data distributed with triangular distribution (an assumption), lets say:

data = [14.5 13 11 11.5 13.75 11.5 7.5 11.25 23.75 12.75]

How can we calculate min and max and mean values based on these data according to triangular distribution?

Nessi
  • 276
  • 1
  • 4
  • 23
  • 1
    If you are talking about estimating the parameters of a probability distribution given some values, that is called [probability distribution fitting](https://en.wikipedia.org/wiki/Probability_distribution_fitting), and it is a complex problem for which several methods exist from frequentist and Bayesian statistics. – jdehesa Aug 26 '20 at 19:42
  • 1
    Write out the likelihood function i.e. p(data | a, b, c) where a, b, and c are the parameters of the triangular distribution, then maximize with respect to the parameters. This is the method of maximum likelihood which you'll find a lot to read about. Interesting question, but not suitable for SO; try stats.stackexchange.com instead. – Robert Dodier Aug 27 '20 at 00:58
  • is there any method in python for it? – Nessi Aug 27 '20 at 03:25
  • may be this method: scipy.stats.triang.fit(data) – Nessi Aug 27 '20 at 03:50
  • 1
    @Nessi Yes, SciPy's [`fit`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.fit.html) will attempt a maximum-likelihood estimation of the distribution parameters (note the comment in the docs: "The returned answer is not guaranteed to be the globally optimal MLE, it may only be locally optimal, or the optimization may fail altogether", although it should work well in simple cases). – jdehesa Aug 27 '20 at 11:50

0 Answers0