-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdist.py
27 lines (24 loc) · 846 Bytes
/
dist.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/python3
# coding: utf-8
'''
@Time : 2021/6/6 16:30
@Author : Shulu Chen
@FileName: dist.py
@Software: PyCharm
'''
import scipy.stats as st
from numpy import random
import matplotlib.pyplot as plt
import seaborn as sns
import math
# sns.distplot(random.normal(size=10000,scale=5,loc=50), hist=False,label="Class 1")
# sns.distplot(random.normal(size=10000,scale=5,loc=75), hist=False,label="Class 2")
# sns.distplot(random.normal(size=10000,scale=5,loc=100), hist=False,label="Class 3")
#
# sns.distplot(random.normal(size=10000,scale=math.sqrt(50),loc=125), hist=False,label="Class 1,2")
# sns.distplot(random.normal(size=10000,scale=math.sqrt(75),loc=225), hist=False,label="Class 1,3")
#
# plt.legend()
# plt.show()
print(125+st.norm.ppf(1-200/340)*7.07)
# print(st.norm.cdf(53.4,loc=50,scale=5))