Spaces:
Sleeping
Sleeping
Update pages/4_Random Variables.py
Browse files- pages/4_Random Variables.py +33 -1
pages/4_Random Variables.py
CHANGED
|
@@ -12,8 +12,40 @@ Function is block of code containing input ---> logic ---> output
|
|
| 12 |
|
| 13 |
**Output** - Real value ---> mapping to a sample space
|
| 14 |
|
| 15 |
-
---> Random variable can't be a string as it is always real value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
st.markdown(multi)
|
| 17 |
st.image("https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/cNKo0r0OiweVLom3NVG6s.png",width = 300)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
|
|
|
| 12 |
|
| 13 |
**Output** - Real value ---> mapping to a sample space
|
| 14 |
|
| 15 |
+
---> Random variable can't be a string as it is always real value
|
| 16 |
+
|
| 17 |
+
X: S → R
|
| 18 |
+
|
| 19 |
+
where
|
| 20 |
+
|
| 21 |
+
X is Random Variable
|
| 22 |
+
|
| 23 |
+
S is Sample Space
|
| 24 |
+
|
| 25 |
+
R is Set of Real Numbers
|
| 26 |
+
|
| 27 |
+
'''
|
| 28 |
st.markdown(multi)
|
| 29 |
st.image("https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/cNKo0r0OiweVLom3NVG6s.png",width = 300)
|
| 30 |
+
multi = '''**Example:**
|
| 31 |
+
|
| 32 |
+
Random Experiment - Rolling a dice twice
|
| 33 |
+
|
| 34 |
+
Trial - 1
|
| 35 |
|
| 36 |
+
Sample space - 36
|
| 37 |
+
|
| 38 |
+
Event - Likelihood of getting a even number out of all outcomes
|
| 39 |
+
|
| 40 |
+
Input - Sample space ---> 36 possible outcomes
|
| 41 |
+
|
| 42 |
+
logic - def f(x,y):
|
| 43 |
+
return (x+y) % 2 == 0
|
| 44 |
+
|
| 45 |
+
output - all even numbers
|
| 46 |
+
|
| 47 |
+
---> Probability(getting even numbers) = 18 / 36 ---> mapping to a sample space
|
| 48 |
+
|
| 49 |
+
'''
|
| 50 |
+
st.markdown(multi)
|
| 51 |
|