-
Notifications
You must be signed in to change notification settings - Fork 0
/
standart sapma istatistik.py
40 lines (35 loc) · 1.21 KB
/
standart sapma istatistik.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
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 19 22:49:51 2020
@author: berk
"""
def st_dev():
from statistics import pstdev, mean,median,mode, pvariance
from scipy import stats
from matplotlib import pyplot as plt
entry=[]
sizeplt=[]
count=0
size =int(input("Enter number of days: "))
while count<size:
val = int(input("Please enter {}. day cases: ".format(count+1)))
entry.append(val)
count += 1
print("Mean is: ",(mean(entry)))
print("Variance is:", (pvariance(entry)))
print("Standard Deviation is:", (pstdev(entry)))
print("Mode is:", (mode(entry)))
print("Coefficient of Variation:",stats.variation(entry))
print("Z Scores are:",stats.zscore(entry))
print("Median is:", (median(entry)))
for z in range(1,len(entry)+1):
sizeplt.append(z)
plt.plot(sizeplt,entry)
plt.title("Turkey Covid-19 Daily Date Information")
plt.xlabel("Day")
plt.ylabel("Cases")
plt.show()
st_dev()
#resources arehttps://docs.python.org/3/library/statistics.html
#https://www.geeksforgeeks.org/scipy-stats-zscore-function-python/
#https://pybilim.wordpress.com/2014/01/01/matplotlib-1-temel-grafikler/