import streamlit as st st.title(":blue[Random Variable]") st.image("https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/zIt7dl4zpigpQI4z4NRe0.webp",width=400) st.subheader(":red[What is Random variable]") multi = '''It is a function that assigns a numerical value to each possible outcome in a sample space, which is the set of all possible results of an experiment. ---> It represents a numerical outcome of a random experiment. Function is block of code containing input ---> logic ---> output **Input** - All the possible outcomes of random experiment (sample space) **Output** - Real value ---> mapping to a sample space ---> Random variable can't be a string as it is always real value X: S → R where X is Random Variable S is Sample Space R is Set of Real Numbers ''' st.markdown(multi) st.image("https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/cNKo0r0OiweVLom3NVG6s.png",width = 300) multi = '''**Example:** Random Experiment - Rolling a dice twice Trial - 1 Sample space - 36 Event - Likelihood of getting a even number out of all outcomes Input - Sample space ---> 36 possible outcomes logic - def f(x,y): return (x+y) % 2 == 0 output - all even numbers ---> Probability(getting even numbers) = 18 / 36 ---> mapping to a sample space ''' st.markdown(multi)