lecture19 - CS 70 Spring 2007 Discrete Mathematics for CS...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 70 Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 19 Random Variables and Expectation Question : The homeworks of 20 students are collected in, randomly shuffled and returned to the students. How many students receive their own homework? To answer this question, we first need to specify the probability space: plainly, it should consist of all 20! permutations of the homeworks, each with probability 1 20! . [Note that this is the same as the probability space for card shuffling, except that the number of items being shuffled is now 20 rather than 52.] It helps to have a picture of a permutation. Think of 20 books lined up on a shelf, labeled from left to right with 1 , 2 ,..., 20. A permutation π is just a reordering of the books, which we can describe just by listing their labels from left to right. Let’s denote by π i the label of the book that is in position i . We are interested in the number of books that are still in their original position, i.e., in the number of i ’s such that π i = i . These are often known as fixed points of the permutation. Of course, our question does not have a simple numerical answer (such as 6), because the number depends on the particular permutation we choose (i.e., on the sample point). Let’s call the number of fixed points X . To make life simpler, let’s also shrink the class size down to 3 for a while. The following table gives a complete listing of the sample space (of size 3! = 6), together with the corresponding value of X for each sample point. [We use our bookshelf convention for writing a permutation: thus, for example, the permutation 312 means that book 3 is on the left, book 1 in the center, and book 2 on the right. You should check you agree with this table.] permutation π value of X 123 3 132 1 213 1 231 0 312 0 321 1 Thus we see that X takes on values 0, 1 or 3, depending on the sample point. A quantity like this, which takes on some numerical value at each sample point, is called a random variable (or r.v. ) on the sample space. Definition 19.1 (random variable) : A random variable X on a sample space Ω is a function that assigns to each sample point ω Ω a real number X ( ω ) . Until further notice, we’ll restrict out attention to discrete random variables: i.e., their values will be integers or rationals, rather than arbitrary real numbers. The r.v. X in our permutation example above is completely specified by its values at all sample points, as CS 70, Spring 2007, Lecture 19 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
given in the above table. (Thus, for example, X ( 123 ) = 3 etc.) Rather than the value at each sample point, we are usually more interested in the set of points at which the r.v. takes on some given value. Let a be any real number. Then the set { ω Ω : X ( ω ) = a } is an event in the sample space (why?). We usually abbreviate this event to simply “ X = a ”. Since X = a is an event, we can talk about its probability, Pr [ X = a ] . The collection of these probabilities, for all possible values of a , is known as the distribution of the r.v. X .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern