# Conditional probability and expectation

> P(A∣B)=P(A and B)/P(B) requires P(B)>0.

Course: [Probability models and continuous distributions](https://studybrix.com/en/courses/university-probability/index.md)
Level: university
Prerequisites: Fractions, sums and elementary probability.

## Notes

### Conditioning

P(A∣B)=P(A and B)/P(B) requires P(B)>0.

### Independence

A and B are independent when P(A and B)=P(A)P(B); independence is not the same as disjointness.

### Expectation

Expectations add even without independence, provided the relevant expectations exist.

### Variance

Variance adds for independent variables; in general include covariance terms.

## Practice questions

### 1. Given P(A and B)=0.12 and P(B)=0.4, find P(A∣B).

Answer: 0.3

Explanation: Divide 0.12 by 0.4.

### 2. X takes values 0,2,5 with probabilities 0.2,0.5,0.3. Find E[X].

Answer: 2.5

Explanation: Compute 0(0.2)+2(0.5)+5(0.3)=2.5.

### 3. Two events have positive probability and are disjoint. Are they independent?

A. Always
B. Only if their names differ
C. No
D. Independence is undefined for events

Answer: No

Explanation: Their intersection probability is zero while the product of their positive probabilities is positive.

### 4. Independent X and Y have variances 4 and 9. Find Var(2X−Y).

Answer: 25

Explanation: Variance scales by the square of coefficients, giving 4×4+9=25.

### 5. Show by an example that E[XY] need not equal E[X]E[Y].

Sample answer / marking guidance: Let X=Y be a fair 0/1 variable. Then E[XY]=E[X]=1/2, while E[X]E[Y]=1/4.

Explanation: Credit a dependent example and both computed quantities.

### 6. Does E[X+Y]=E[X]+E[Y] require independence?

A. Yes in every case
B. Only if the means are zero
C. Only for normal distributions
D. No, assuming expectations exist

Answer: No, assuming expectations exist

Explanation: Linearity of expectation does not require independence.

### 7. X is binomial with n=10 and p=0.3. Find its variance.

Answer: 2.1

Explanation: np(1−p)=10(0.3)(0.7).

### 8. Explain why reversing a conditional probability without adjusting for base rates is generally wrong.

Sample answer / marking guidance: P(A∣B) and P(B∣A) have different conditioning populations. Bayes rule includes P(A) and P(B), so the two need not be equal.

Explanation: Credit the change in denominator or conditioning population and the role of base rates.

## Further reading

- https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/
- https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/

Original AI-assisted educational draft; not independently teacher-reviewed. References support further study, not copied exercises, affiliation or curriculum accreditation.
