1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Quantile-Quantile Plot using python statsmodels api

Discussão em 'Python' iniciado por Stack, Junho 16, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to see whether a normal distribution with specific parameters fits to a data set. However it seems qqplot does not work as it is expected to. The following small example shows this:

    import numpy as np
    import statsmodels.api as sm
    import pylab

    test = np.random.normal(20,5, 1000)

    sm.qqplot(test, loc = 20, scale = 5 , line='45')
    pylab.show()


    As one can see I expect the points to be around the line with slope = 1 but it gives the following figure:

    [​IMG]

    Can anyone explain me why this happens?

    Continue reading...

Compartilhe esta Página