Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 对数正态概率拟合图与概率发生_Python - Fatal编程技术网

Python 对数正态概率拟合图与概率发生

Python 对数正态概率拟合图与概率发生,python,Python,我最近开始使用python进行数据分析,下面给出了这个问题。 我有一套长度测量(粘贴在下面)。我对长度进行了对数正态拟合 我的剧本: data=np.array(R0) sig,loc, mu=lognorm.fit(data, loc=0) print(sig, loc, mu) est_mu=np.log(mu) mean=np.exp(est_mu + ((sig**2)/2)) print(mean) plt.hist(data, bins=200, normed=True, color

我最近开始使用python进行数据分析,下面给出了这个问题。 我有一套长度测量(粘贴在下面)。我对长度进行了对数正态拟合

我的剧本:

data=np.array(R0)
sig,loc, mu=lognorm.fit(data, loc=0)
print(sig, loc, mu)
est_mu=np.log(mu)
mean=np.exp(est_mu + ((sig**2)/2))
print(mean)
plt.hist(data, bins=200, normed=True, color='c', alpha=0.75)
xmin = data.min()
xmax = data.max()
x = np.linspace(xmin, xmax, 1000)
pdf = lognorm.pdf(x, sig, scale=mu)
plt.plot(x, pdf, 'k', lw=2)
plt.xlim(xmax=100)
plt.show()
17.648、27.666、11.016、9.779、9.176、21.496、, 45.725, 6.077, 9.534, 25.074, 8.225, 7.651, 17.229, 11.251, 3.598, 5.252, 14.622, 7.012, 3.958, 11.022, 23.165, 8.561, 7.132, 4.677, 10.143, 21.844, 10.613, 17.426, 19.967, 16.152, 25.279, 11.379, 6.137, 3.982, 4.015, 6.116, 5.794, 8.593, 13.006, 5.003, 6.953, 5.495, 9.706, 10.538, 24.762, 4.656, 37.064, 12.382, 16.636, 6.002, 9.035, 15.035, 9.986, 12.981, 6.383, 5.906, 15.096, 8.547, 8.157, 11.339, 15.183, 12.595, 5.093, 91.611, 6.343, 3.586, 6.117, 3.598, 4.408, 37.298, 3.67 , 23.891, 7.809, 7.409, 17.367, 12.122, 10.231, 8.354, 10.007, 27.254, 26.09 , 6.474, 4.559, 10.672, 5.738, 2.648, 8.884, 10.861, 2.159, 10.515, 6.068, 7.654, 12.195, 7.41 , 5.774, 7.099, 8.744, 6.014, 5.934, 9.664, 5.296, 2.15 , 5.544, 29.579, 1.979, 24.426, 8.455, 10.924, 15.311, 4.522, 5.297, 8.996, 15.947, 10.793, 13.507, 16.749, 18.107, 3.362, 14.476, 7.52 , 5.756, 4.873, 12.076, 18.12 , 5.756, 2.742, 5.397, 25.848, 15.033, 4.643, 6.391, 13.241, 11.219, 11.124, 10.741, 11.695, 5.507, 16.328, 8.763, 8.107, 45.584, 21.057, 10.155, 5.24 , 5.178, 2.367, 8.164, 14.347, 15.214, 8.474, 11.953, 5.845, 3.692, 18.576, 8.705, 11.649, 24.352, 20.386, 9.556, 7.973, 8.789, 26.524, 3.634, 9.701, 13.098, 6.448, 10.177, 24.611, 10.61 , 17.789, 3.418, 9.355, 5.672, 7.555, 13.411, 5.691, 3.983, 6.183, 22.338, 12.958, 12.465, 7.656, 5.461, 5.936, 10.017, 7.228, 4.857, 15.089, 13.351, 9.663, 18.683, 4.137, 7.508, 12.724, 7.287, 5.868, 5.205, 4.285, 5.037, 11.254, 5.749, 9.124, 5.183, 36.628, 221.36 , 8.547, 9.372, 8.17 , 4.937, 7.807, 11.203, 10.184, 16.937, 21.989, 41.24 , 7.751, 5.155, 7.208, 16.618, 9.411, 3.475, 2.698, 18.455, 47.067, 8.452, 6.896, 6.287, 12.938, 10.939, 8.814, 11.89 , 7.685, 34.591, 7.437, 12.402, 9.728, 17.018, 16.65 , 12.904, 7.016, 13.25 , 16.881, 14.099, 10.304, 27.82 , 8.308, 10.11 , 7.249, 8.615, 10.522, 9.509, 5.775, 6.38 , 6.134, 7.251, 10.635, 11.029, 8.844, 6.585, 15.063, 6.129, 7.213, 6.864, 10.368, 5.378, 11.752, 3.746, 8.389, 4.839, 7.847, 24.221, 13.046, 15.547, 5.44 , 8.501, 5.593, 58.495, 12.027, 9.096, 5.685, 12.169, 9.746, 11.714, 6.655, 7.936, 40.984, 20.386, 7.965, 11.565, 15.374, 8.882, 4.181, 25.022, 7.44 , 17.461, 11.128, 11.602, 26.285, 14.571, 9.51 , 9.163, 7.226, 7.37 , 13.927, 6.928, 6.619, 27.418, 7.555, 6.282, 21.891, 32.833, 12.918, 7.687, 9.842, 18.294, 11.22 , 6.377, 9.299, 11.736, 22.436, 34.386, 10.874, 5.463, 12.046, 13.23 , 10.714, 22.224, 17.372, 5.596, 31.297, 14.381, 16.848, 9.195, 6.425, 27.292, 12.945, 34.391, 10.665, 8.995, 7.249, 8.424, 15.385, 53.774, 23.743, 4.521, 9.714, 12.7 , 33.629, 14.605, 25.513, 24.347, 27.3 , 32.531, 9.538, 39.054, 21.92 , 11.28 , 22.648, 20.664, 22.578, 8.022, 6.98 , 16.549, 4.752, 16.507, 25.815, 25.66 , 36.848, 17.803, 13.76 , 13.36 , 8.994, 23.603, 9.001, 26.949, 10.714, 10.796, 30.991, 34.404, 11.877, 14.423, 38.302, 41.899, 23.424, 9.967, 11.532, 19.422, 21.605, 5.905, 44.344, 12.717, 5.549, 11.777, 12.309, 22.736, 11.693, 9.014, 4.276, 14.747, 16.941, 9.714, 17.851, 17.207, 9.004, 39.633, 19.456, 15.684, 17.25 , 22.088, 20.25 , 15.725, 15.793, 16.781, 13.373, 13.547, 7.677, 24.117, 10.392, 24.756, 15.258, 12.546, 72.518, 35.263, 5.037, 13.28 , 14.758, 58.34 , 10.357, 45.442, 26.091, 23.219, 30.244, 10.34 , 29.596, 19.727, 14.878, 31.585, 11.789, 6.994, 11.708, 16.175, 10.863, 11.122, 25.317, 7.061, 26.499, 6.676, 21.077, 8.132, 7.835, 7.927, 19.991, 36.253, 12.539, 11.132, 30.553, 14.955, 22.234, 9.776, 27.305, 30.167, 11.229, 12.811, 29.938, 10.833, 28.724, 24.441, 14.562, 26.585, 11.074, 12.13 , 8.634, 25.328, 14.803, 12.678, 26.18 , 10.916, 18.151, 28.292, 9.193, 11.639, 16.1 , 15.228, 12.954, 14.962, 21.931, 27.64 , 13.111, 46.19 , 6.383, 7.754, 10. , 7.424, 12.329, 9.27 , 50.592, 29.975, 14.855, 17.547, 14.061, 12.422, 17.874, 22.45 , 15.389, 15.805, 30.501, 10.006, 31.134, 10.875, 17.682, 18.235, 8.77 , 8.25 , 13.1