_Advance_statistics_ / pages /5. Distributions.py
Akhil4839's picture
Update pages/5. Distributions.py
b3e57af verified
import streamlit as st
st.header(":blue[DISTRIBUTION]")
st.write("A distribution describes how the values of a random variable are spread or distributed.It provides the probabilities or frequencies with which different possible outcomes occur. there are two type of random variables: discrete and continuous which we discuss in the last page")
st.subheader(":rainbow[1. Discrete Probability Distribution]")
st.write("For discrete variables, the outcomes are countable.")
multi = """:green[Example:]Number of cars passing a red light
- This could be 0, 1, 2, 3, or more cars.
- The probability of each number would depend on factors like traffic volume and the timing of the red light.
"""
st.markdown(multi)
st.subheader(":red[Probability mass function (PMF):]")
st.write("A probability mass function (pmf) is a function over the sample space of a discrete random variable X which gives the probability that X is equal to a certain value.")
st.markdown(":grey-background[Formula:]")
st.latex("P(x)=P[X=x]")
st.subheader(":rainbow[2. Continuous Probability Distribution]")
st.write("For continuous variables, the outcomes are uncountable.")
multi = """:green[Example:]"""