Conditional Expectation

Lucas Schiffer
January 20, 2016

Data Analysis for the Life Sciences

Today's Topics

  • Introduction
  • Conditional Probability / Conditional Expectation
  • Galton Height Data
  • Regression as Machine Learning
  • Conditional Expectation / Optimal Prediction
  • Exercises

Introduction

  • Conditional probability and conditional expectation are slightly different
  • Both are often useful as machine learning techniques
  • Helpful in solving classification and prediction problems
  • Generally useful for categorical and continuous outcomes

Conditional Probability / Conditional Expectation

  • Conditional probability
  • What is the probability that the next marble is green given that the first was yellow?
  • \[ f_{k}(x)=Pr(Y=k\ |\ X = x) \]
  • Conditional Expectation
  • Given that the first marble was yellow, what color is expected next?
  • \[ E[(\hat{Y}-Y)^2|X=x] \]

Galton Height Data

  • Francis Galton created a height dataset (1885)
  • Useful for conditional expectation practice

plot of chunk unnamed-chunk-1

Regression as Machine Learning

  • Suppose we want to predict a random son's height
  • Suppose we want to predict a son's height who's father is 71 inches tall
  • \[ E[(\hat{Y}-Y)^2|X=71] \]

Conditional Expectation / Optimal Prediction



plot of chunk unnamed-chunk-2



plot of chunk unnamed-chunk-3

Exercises