Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,4 +45,26 @@ descriptive statistics can be performed on sample data as well as population dat
|
|
| 45 |
the key points of descriptive statistics are stated below.\n KEY COCEPTS\n * Measurement of Central Tendency which involves finding Mean, Median, and Mode.\n * Measurement of Dispersion which involves finding Range, Variance and Standard Deviation.\n * Distribution which gives how frequently the data is occurring some of examples of distribution are Gaussian, Random, and Normal distribution""")
|
| 46 |
st.subheader("Measure Of Central Tendency",divider=True)
|
| 47 |
st.markdown("""The measure of central tendency is used to find the central average value of the data.The central tendency can be computed by
|
| 48 |
-
useing three ways \n * Mode \n * Median \n * Mean""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
the key points of descriptive statistics are stated below.\n KEY COCEPTS\n * Measurement of Central Tendency which involves finding Mean, Median, and Mode.\n * Measurement of Dispersion which involves finding Range, Variance and Standard Deviation.\n * Distribution which gives how frequently the data is occurring some of examples of distribution are Gaussian, Random, and Normal distribution""")
|
| 46 |
st.subheader("Measure Of Central Tendency",divider=True)
|
| 47 |
st.markdown("""The measure of central tendency is used to find the central average value of the data.The central tendency can be computed by
|
| 48 |
+
useing three ways \n * Mode \n * Median \n * Mean""")
|
| 49 |
+
def mode(list1):
|
| 50 |
+
dict1={}
|
| 51 |
+
dict2={}
|
| 52 |
+
set1=set(list1)
|
| 53 |
+
for i in list1:
|
| 54 |
+
for j in set1:
|
| 55 |
+
dict1[j]=list1.count(j)
|
| 56 |
+
max_value=max(dict1.values())
|
| 57 |
+
count = [key for key, value in dict1.items() if value==max_value]
|
| 58 |
+
if max_value==1:
|
| 59 |
+
print('no mode')
|
| 60 |
+
elif len(count)==len(set1):
|
| 61 |
+
print('no mode')
|
| 62 |
+
elif len(count)==1:
|
| 63 |
+
dict2[count[0]]= dict1.get(count[0])
|
| 64 |
+
print(dict2)
|
| 65 |
+
elif len(count)==2:
|
| 66 |
+
print('bi mode')
|
| 67 |
+
elif len(count)==3:
|
| 68 |
+
print('tri mode')
|
| 69 |
+
else:
|
| 70 |
+
print('multimode')
|