1. Home
  2. Explore
  3. Computer Science
  4. CS109 Course Feedback Process

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

CS109 Course Feedback Process

Speaker 1Speaker 2

CS109 Course Feedback Process

4:33
0:00-4:33
  1. Anna

    Alright Corey, before we dive in, did you catch the announcements from the start of today's lecture? The instructor mentioned course feedback—they're doing this high-resolution feedback thing where they randomly sample students throughout the quarter instead of waiting for mid-course evals.

  2. Corey

    Yeah, that's actually really smart. They even added more virtual office hours based on earlier feedback. And they're putting the secret code into recordings now, which is nice. Today's code was 'binomial bunny'—fitting, since we're finally talking about the binomial distribution.

  3. Anna

    Exactly! And that's the big topic today. Let's start with random variables. Remember, a random variable is just a variable that takes on values with certain probabilities. The complete description is its probability mass function, or pmf.

  4. Corey

    Right, and the pmf gives us the probability for each possible value. But so far we've only talked about expectation as a summary. Today we're adding variance, which measures spread. But first, let's nail down binomial random variables.

  5. Anna

    Absolutely. The binomial is the classic: you have n independent trials, each with the same success probability p, and you count the number of successes. That's it. Think of flipping a coin n times and counting heads. That narrative shows up everywhere.

  6. Corey

    Like the number of clicks on ads, or crashes in a computer cluster, or votes in an election. And the beauty is that if you recognize the pattern, you can just declare 'X is Binomial(n,p)' and inherit all the math—especially the pmf: P(X=k) = (n choose k) p^k (1-p)^(n-k).

  7. Anna

    Exactly. And we saw a great demo of that with the Galton board. Marbles drop through pins, going left or right at each level—that's exactly a binomial with n levels and p=0.5 for going right. The distribution of marbles in the buckets perfectly matches the binomial pmf.

  8. Corey

    It's amazing to see order come from chaos. And we also looked at a basketball series example: Warriors vs. Bucks in a best-of-seven. If each game is independent with a 0.55 win probability, the number of wins X is Binomial(7, 0.55). The probability of winning the series (at least 4 wins) is just summing the pmf from k=4 to 7.

  9. Anna

    Right, and that sum gives about 0.61. A key point: even though in reality they stop playing after four wins, our model with all seven games still gives the correct probability because we're accounting for all possible sequences. Great question from a student about that.

  10. Corey

    Yeah, they clarified that treating it as seven independent trials works, even if the series ends early. The binomial expectation is also simple: E[X] = n p. And we can derive that by thinking of the binomial as a sum of n independent Bernoulli random variables—each representing a single trial.

  11. Anna

    Bernoulli is just the special case where n=1. So X_i is 1 if trial i is a success, 0 otherwise. Then X = sum of X_i, and by linearity of expectation, E[X] = n * E[X_i] = n * p. That derivation is neat.

  12. Corey

    Now, expectation alone isn't enough. The lecture used a peer-grading example to motivate variance. Three graders all give the same expected grade, but one is very consistent, one is wild, and one is biased. We need a measure of spread.

  13. Anna

    Exactly. Students suggested using average distance from the mean. Two natural choices: average absolute deviation and average squared deviation. Statisticians mostly use the squared version—that's variance. It's defined as Var(X) = E[(X - μ)^2], where μ = E[X].

  14. Corey

    And a common alternative formula is Var(X) = E[X^2] - (E[X])^2. That's easier to compute. You get E[X^2] using the Law of the Unconscious Statistician (LOTUS): E[g(X)] = sum over all x of g(x) * P(X=x). So for E[X^2], you square each x before multiplying by its probability.

  15. Anna

    Right, and that's different from squaring E[X] first. The standard deviation is just the square root of variance, which brings units back to the original scale. So today we've added variance as a second summary statistic, alongside expectation, to describe random variables.

  16. Corey

    And we've got the binomial and Bernoulli families under our belt. Next time we'll meet the Poisson distribution. But for now, great job recognizing those patterns—remember, if a problem involves independent trials with constant success probability, you know what to call it.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent