Spaces:
Sleeping
Sleeping
Download app.py from abhijeetarjun1996/Probability: direct link, hf CLI and curl.
- Browser
- Download file 4.59 kB
-
https://huggingface.co/spaces/abhijeetarjun1996/Probability/resolve/main/app.py
- Command line
-
hf download hf://spaces/abhijeetarjun1996/Probability/app.py
-
curl -L -o app.py https://huggingface.co/spaces/abhijeetarjun1996/Probability/resolve/main/app.py
4.59 kB
| import streamlit as st | |
| import numpy as np | |
| import pandas as pd | |
| st.title("Probability and Distribution") | |
| st.header(":blue[Probability]") | |
| st.write("Probability is a fundamental concept in statistics and mathematics, and it involves various terms and concepts. Some of the important terminologies of Probabibility are ") | |
| st.header("Distribution") | |
| st.write("Distribution describes how probabilities are assigned to the values of a random variable. It provides a complete description of the random variable's behavior.") | |
| st.subheader("Types of Distributions:") | |
| st.subheader("1. Discrete Probability Distribution") | |
| st.write("For discrete random variables, represented by a Probability Mass Function (PMF). It specifies the probability of each possible value.") | |
| st.write("Example: For a fair six-sided die, the PMF would assign a probability of to each outcome (1, 2, 3, 4, 5, 6).") | |
| st.subheader("2.Continuous Probability Distribution") | |
| st.write("For continuous random variables, represented by a Probability Density Function (PDF). The PDF describes the likelihood of the variable taking on a range of values.") | |
| st.write("Example: The normal distribution, often used in statistics, is described by its mean and standard deviation. The area under the curve of the PDF represents probabilities for intervals.") | |
| st.header("Commonly used Distributions") | |
| st.subheader("Discrete distribution") | |
| st.write("Binomial Distribution: Models the number of successes in n independent Bernoulli trials.") | |
| st.write("Poisson Distribution: Models the number of events occurring in a fixed interval of time or space.") | |
| st.header("Continuous Distribution") | |
| st.write("Normal Distribution: Described by its mean (μ) and standard deviation (σ). It has a characteristic bell-shaped curve.") | |
| st.write("Exponential Distribution: Models the time until an event occurs, commonly used for time-to-failure analysis.") | |
| st.header("Events") | |
| st.write("events are specific outcomes or combinations of outcomes from a random experiment. Understanding the different types of events is crucial for analyzing probabilities and making inference") | |
| st.header("Simple Events:") | |
| st.write("A simple event consists of a single outcome. For example, rolling a die and getting a 4 is a simple event.") | |
| st.header("Compound Events:") | |
| st.write("A compound event consists of two or more simple events. For instance, rolling an even number on a die involves the outcomes {2, 4, 6}.") | |
| st.write("If E is the event of rolling an even number, then E={2,4,6}.") | |
| st.header("Mutually Exclusive Events:") | |
| st.write("Two or more events are mutually exclusive (or disjoint) if they cannot occur at the same time. For example, when rolling a die, the events of rolling a 2 and rolling a 5 are mutually exclusive.") | |
| st.write("Mathematically,P(A∩B)=0 if events A and B are mutually exclusive.") | |
| st.header("Non-Mutually Exclusive Events:") | |
| st.write("Events that can occur simultaneously are called non-mutually exclusive. For example, in a card draw, the events of drawing a heart and drawing a red card are non-mutually exclusive since hearts are red.") | |
| st.header("Independent Events:") | |
| st.write("Two events are independent if the occurrence of one event does not affect the occurrence of the other. For instance, flipping a coin and rolling a die are independent events.") | |
| st.write("Mathematically, P(A∩B)=P(A)⋅P(B) for independent events A and B.") | |
| st.header("dependent Events:") | |
| st.write("Events are dependent if the occurrence of one event affects the occurrence of another.") | |
| st.write("Ex: drawing two cards from a deck without replacement makes the events dependent.") | |
| st.write("In this case, the probability changes based on previous outcomes.") | |
| st.header("Complementary Events") | |
| st.write("The complement of an event A (denoted as 𝐴′A ′) is the set of all outcomes in the sample space that are not in A. If A is the event of rolling an even number, then its complement A′is rolling an odd number.") | |
| st.header(":blue[Empirical rule]") | |
| st.write("In statistics 68 - 95 - 99.7rule also known as the emprical rule can also be sometimes abbrveiated as 3sr is a short hand used to remember the percentage of values that lie within the interval estimatein normal distibution approximately 68%,95% and 99.7% of the values that lie within the one,two and three standard devaiations of the mean") | |
| st.write("In mathematical function these facts can be expressed as follows.where Pr() is the probability functions,X is an observation from normally distributed raandom variables,μ stands for mean and σ stands for standard deviation") | |