DOMMETI commited on
Commit
f5cd890
·
verified ·
1 Parent(s): 5927245

Update pages/2_Events.py

Browse files
Files changed (1) hide show
  1. pages/2_Events.py +13 -1
pages/2_Events.py CHANGED
@@ -86,4 +86,16 @@ st.markdown("""Events are classified into the below gievn types
86
  st.subheader("SIMPLE EVENT")
87
  st.markdown("""An event is said to be a simple event when the outcome of an event is 1.
88
  """,unsafe_allow_html=True)
89
- st.title("Example of Simple Event")
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  st.subheader("SIMPLE EVENT")
87
  st.markdown("""An event is said to be a simple event when the outcome of an event is 1.
88
  """,unsafe_allow_html=True)
89
+ st.title("Example of Simple Event")
90
+ Trail_5 = st.number_input("Number of Trials:", min_value=1, max_value=100, value=7,key="Trail_5")
91
+ if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment_3"):
92
+ st.write(f"Running {Trail_5} trials...")
93
+ list1=[]
94
+ for i in range(1, Trail_5 + 1):
95
+ result = random.choice(['Rain', 'No Rain'])
96
+ list1+=[result]
97
+ p_rain_1=1/len(np.unique(list1))
98
+ p_no_rain_1=1/len(np.unique(list1))
99
+ st.write(f"Event_1:Probability of having rain:{p_rain_1}")
100
+ st.write(f"Event_1:Probability of having no_rain:{p_no_rain_1}")
101
+ st.write(f"From the above example we can say that the simple event is giving only 1 outcome.")