Inelegant Explorations of Some Personal Problems

# Estimating Expectations and Variances using Python

Last week, for pedagogical reasons, I had to solve the following problem: In a bag there are $4$ blue and $5$ red balls. We randomly take $3$ balls from the bag without replacement. Let the random variable $X$ denote the number of blue balls we get. Find out the expectation and variance of $X$.

# A Triangle from a Stick

A famous problem in probability is this: Suppose you randomly1 break a stick in two places. You will get three smaller pieces of stick. What is the probability that you can form a triangle using these pieces? One interesting thing about this problem is that depending on how you visualize breaking the stick, you get different probabilities.