一个在python中创建QQ图的函数

问题描述 投票:0回答:1

我有一个来自.txt文件的数据集,我需要创建一个函数,该函数针对具有10,000个样本的标准正态分布创建QQ图。到目前为止,我有:

# where ecdf is my data that i read in from the .txt file
def qqfunction(ecdf):
    rand1 = np.random.normal(0,1,10000)

但是我不确定下一步该怎么做?

python numpy normal-distribution qq
1个回答
0
投票
from statsmodels.graphics.gofplots import qqplot
import numpy as np
rand1 = np.random.normal(0,1,10000)
qqplot(rand1)

这将输出您数据的QQ图。

© www.soinside.com 2019 - 2024. All rights reserved.