So the expected value under a Bernoulli distribution if we take

what are the outcomes, 1 and 0, and

what are the probabilities associated with those outcomes?

That weighted sum, our best guess, our expectation,

is that's the mean of the Bernoulli distribution, so probability p.

We can also calculate the variance under the Bernoulli distribution.

So when it comes to writing out the likelihood of a single observation from

the Bernoulli distribution, this is the form that it takes on.

Now, notice, it's the probability p raised to the power y (1-

p) raised to the power of 1- 1.

Now it looks a little bit foreign, but

let's break it down based on the values that y can take on.

Suppose we observe a 1, all right, y equals 1.

Well, p raised to the power of y means I have a value of p.

(1- p) raised to the power of 1- y,

so raised to the power of 0, that term is going to go away.

So the likelihood for a single draw from a Bernoulli distribution,

if I observe a 1, y equals 1, the likelihood is p.

All right, well, what if I observe y equals 0?

If y equals 0, it's p raised to the power of y.

P raised to the 0, well that term equals 1, so that essentially goes away and

then, I'm left with a likelihood of (1- p) raised to the power of 1- 0.

So when I observe a 1, the likelihood is p, when I observe a 0,

the likelihood is 1- p.

Now again,

that's just mapping onto the two values that we had talked about earlier.

And then the product, saying, let's multiply that

function over all the data points that we observe.

All right, now how do we go about bringing covariance or

marketing activity into this?

Recall when we looked at linear regression,

what we said was the outcome's y following normal distribution with the mean mu.

All right, and we said mu was a function of marketing activity.

Well, what we're going to do here is say,

my outcome is a function of the parameter p.

Well, my probability p is going to be a function of marketing activity.

We're just going to change the form in which that marketing activity effects

the probability p.

All right, so we talked about this piece already, said outcomes follow

Bernoulli distributions, and we can write out the likelihood function.

When we bring in marketing activity, we're going to change that a little bit, and

say that the probabilities p, well,

they're going to be a function of the marketing activity.

All right, so we're going to look at an example for customer acquisition.

Well, marketing actions are going to affect the acquisition probability.

So the acquisition probability may be affected by, did I send you an email?

Did I send you a coupon?