Opportunity Through Data Textbook
  • Opportunity Through Data Textbook
  • Introduction
    • What is Data Science?
    • Introduction to Data Science: Exploratory Musical Analysis
  • Module 1
    • Introduction to Programming
      • The Command Line
      • Installing Programs
      • Python and the Command Line
      • Jupyter Notebook
    • Introduction to Python
      • Building Blocks of Python - Data Types and Variables
      • Functions
      • Formatting and Syntax
    • Math Review
      • Variables and Functions
      • Intro to Graphs
  • Module 2
    • Data Structures
      • Lists
      • Dictionaries
      • Tables
    • Programming Logic
      • Loops
      • Logical Operators
      • Conditionality
  • Module 3
    • Introduction to Probability
      • Probability and Sampling
    • Introduction to Statistics
      • Mean & Variance
      • Causality & Randomness
  • Module 4
    • Packages
    • Intro to NumPy
      • NumPy (continued)
  • Module 5
    • Introduction to Pandas
      • Introduction to Dataframes
      • Groupby and Join
    • Working with Data
    • Data Visualization
      • Matplotlib
      • Introduction to Data Visualization
  • Appendix
    • Table Utilities
    • Area of More Complicated Shapes
    • Introduction to Counting
    • Slope and Distance
    • Short Circuiting
    • Linear Regression
    • Glossary
  • Extension: Classification
    • Classification
    • Test Sets and Training Sets
    • Nearest Neighbors
  • Extension: Introduction to SQL
    • Introduction to SQL
    • Table Operations
      • Tables and Queries
      • Joins
  • Extension: Central Limit Theorem
    • Overview
    • Probability Distributions
      • Bernoulli Distribution
      • Uniform Distribution (Discrete)
      • Random Variables, Expectation, Variance
      • Discrete and Continuous Distributions
      • Uniform Distribution (Continuous)
      • Normal Distribution
    • Central Limit Theorem in Action
    • Confidence Intervals
  • Extension: Object-Oriented Programming
    • Object-Oriented Programming
      • Classes
      • Instantiation
      • Dot Notation
      • Mutability
  • Extension: Introduction to Excel
    • Introduction to Excel
      • Terminology and Interface
      • Getting Started with Analysis and Charts
      • Basics of Manipulating Data
    • Additional Features in Excel
      • Macros
      • The Data Tab
      • Pivot Tables
Powered by GitBook
On this page

Was this helpful?

  1. Extension: Central Limit Theorem
  2. Probability Distributions

Bernoulli Distribution

The Bernoulli distribution has an outcome space of two events {0, 1}, one of which happens with probability 1-p and the other which happens with probability p.

P(X=x)={1−p,x=1p,x=00,x≠0,1P(X=x) =\begin{cases}1-p,&x=1\\p, &x=0\\0, &x\not=0,1\end{cases}P(X=x)=⎩⎨⎧​1−p,p,0,​x=1x=0x=0,1​

A real-world system this distribution can model is a coin flip. Here, the two outcomes are heads (represented by 1) and tails (represented by 0). If the coin is fair, then p = 0.5.

Which of the following can be reasonably modeled by the Bernoulli distribution?

(a) Rolling a 6-sided die

(b) Passing or failing your driver test

(c) The weather tomorrow

(b) is the correct answer because the outcome of a driving test is always either a pass or a fail. (a) and (c) both have outcome spaces that have more than two events in them; the die has six outcomes and the weather can be sunny, rainy, cloudy, snowy, etc. The Bernoulli distribution is not a good fit for these systems.

PreviousProbability DistributionsNextUniform Distribution (Discrete)

Last updated 4 years ago

Was this helpful?