Git Product home page Git Product logo

dsc-conditional-probability-lab-dc-ds-100719's Introduction

Conditional Probability - Lab

Introduction

In order to be ready for real-world applications of probability, it is important to understand what happens when probabilities are not independent. Very often, the probability of a certain event depends on other events happening! Let's see how this all works in this lab.

Objectives

You will be able to:

  • Differentiate between independent and dependent events
  • Use the multiplication rule to find the probability of the intersection of two events

Exercise 1

A coin is tossed and a single 6-sided dice is rolled. Find the probability of landing on the head side of the coin and rolling a 3 on the dice.

# Your code here

Exercise 2

After conducting a survey, one of the outcomes was that 8 out of 10 of the survey subjects liked chocolate chip cookies. If three survey subjects are chosen at random with replacement, what is the probability that all three like chocolate chip cookies?

# Your code here

Exercise 3

70% of your friends like chocolate flavored ice cream, and 35% like chocolate AND like strawberry flavors.

What percent of those who like chocolate also like strawberry?

# Your code here

50% of your friends who like chocolate also like strawberry

Exercise 4

What is the probability of drawing 2 consecutive aces from a deck of cards.

# Your code here

Exercise 5

In a manufacturing factory that produces a certain product, there are 100 units of the product, 5 of which are defective. We pick three units from the 100 units at random.

What is the probability that none of them are defective? Hint: Use the chain rule here!

# Your code here

Exercise 6

Let's consider the example where 2 dice are thrown. Given that at least one of the dice has come up on a number higher than 4, what is the probability that the sum is 8?

Let $i,j$ be the numbers shown on the dice. The events $A$ and $B$ are described below:

  • Event $A$ is when either $i$ or $j$ is 5 or 6 (keep an eye on either - or)

  • Event $B$ is when $i + j = 8$

  • What is the size of sample space $\Omega$ ?

  • What is $P(A \cap B)$ ?

  • What is $P(A)$ ?

  • Use above to calculate $P(B \mid A)$

# Your code here

Exercise 7

Let's consider a credit card example. At a supermarket, customers are selected randomly, the store owner recorded whether costumers owned a Visa card (event A) or an Amex credit card (event B). Some customers own both cards. You can assume that:

  • $P(A)$ = 0.5
  • $P(B)$ = 0.4
  • both $A$ and $B$ = 0.25.

With the knowledge we have about conditional probabilities, compute and interpret the following probabilities:

  • $P(B \mid A)$
  • $P(B' \mid A)$
  • $P(A \mid B)$
  • $P(A' \mid B)$
# Your code here

Summary

In this lab, you practiced conditional probability and its theorem with some simple problems. The key takeaway from this lab is to be able to identify random events as dependent or independent and calculating the probability of their occurrence using appropriate methods. Next, you'll learn about some more conditional probability axioms, building on the knowledge we have so far.

dsc-conditional-probability-lab-dc-ds-100719's People

Contributors

lmcm18 avatar loredirick avatar mas16 avatar shakeelraja avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.