Book Image

Principles of Data Science - Second Edition

By : Sinan Ozdemir, Sunil Kakade, Marco Tibaldeschi
Book Image

Principles of Data Science - Second Edition

By: Sinan Ozdemir, Sunil Kakade, Marco Tibaldeschi

Overview of this book

Need to turn programming skills into effective data science skills? This book helps you connect mathematics, programming, and business analysis. You’ll feel confident asking—and answering—complex, sophisticated questions of your data, making abstract and raw statistics into actionable ideas. Going through the data science pipeline, you'll clean and prepare data and learn effective data mining strategies and techniques to gain a comprehensive view of how the data science puzzle fits together. You’ll learn fundamentals of computational mathematics and statistics and pseudo-code used by data scientists and analysts. You’ll learn machine learning, discovering statistical models that help control and navigate even the densest datasets, and learn powerful visualizations that communicate what your data means.
Table of Contents (17 chapters)
16
Index

Compound events

Sometimes, we need to deal with two or more events. These are called compound events. A compound event is an event that combines two or more simple events. When this happens, we need a special notation.

Given events A and B:

  • The probability that A and B occur is P(A ∩ B) = P(A and B)
  • The probability that either A or B occurs is P(A B) = P(A or B)

Understanding why we use the set notation for these compound events is very important. Remember how we represented events in a universe using circles earlier? Let's say that our universe is 100 people who showed up for an experiment in which a new test for cancer is being developed:

Compound events

In the preceding diagram, the red circle, A, represents 25 people who actually have cancer. Using the relative frequency approach, we can say that P(A) = number of people with cancer/number of people in study, that is, 25/100 = ¼ = .25. This means that there is a 25% chance that someone has cancer.

Let's introduce a second event...