Random Assignment vs Random Variable

Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.

Random assignment

Collecting data and study design

Random assignment lets a chance device decide which experimental unit receives which treatment, which is what licenses a cause-and-effect conclusion.

Random assignment means a chance device, not the experimenter, decides which unit gets which treatment, and the device's probabilities do not depend on anything about the unit. That is the whole requirement. It does not demand equal group sizes and it does not promise that the finished groups will look alike. What it buys is that every variable other than the treatment was spread across the groups by that same chance mechanism, so a difference in the response has only two explanations left, the treatment or chance, and the p-value measures the second one.

Balance is a tendency, not a guarantee. Take 20 subjects, 10 of them women, split into two groups of 10 by shuffling names. The expected split is 5 and 5, but the chance of landing exactly there is (105)2(2010)=63504184756=0.344\frac{\binom{10}{5}^2}{\binom{20}{10}} = \frac{63504}{184756} = 0.344. A group holding 8 or more of the 10 women turns up about 2.3 percent of the time, and all 10 landing together about once in 92,000 assignments.

So "the treatment group came out older on average, so the randomization failed" reads the wrong thing. Random assignment is judged on the procedure used, not on the split it produced, and imbalance of exactly that size already sits inside the reference distribution the p-value comes from. Redrawing until the groups look even destroys that: the assignment is no longer random and the stated error rate no longer holds.

The boundary is who is in the study at all, and random assignment says nothing about it. Forty volunteers randomly assigned support a causal claim about people like those volunteers and about no one else. Widening the audience takes random selection, a separate act on a separate list; see scope of inference.

Topic 1.13 lists random assignment beside comparison, replication, and direct control as the four elements of a well-designed experiment.

Full entry for random assignment

Random variable

Random variables and distributions

A random variable assigns a numerical value to each outcome of a chance process, so its value is determined by the result of a random event.

A random variable is a rule that attaches a number to every outcome of a chance process. The rule itself is not random. The randomness sits in which outcome occurs, and once the outcome is known the variable has one definite value. Notation carries that distinction: a capital letter, usually XX, names the rule, and a lowercase xx names one value the rule can produce. That is why probabilities are written P(X=x)P(X = x), read as the probability that XX takes the particular value xx.

Flip a fair coin twice. The sample space is HH, HT, TH, TT, each outcome with probability 0.25. Let XX count the heads. Then HH maps to 2, HT and TH both map to 1, and TT maps to 0. Four outcomes collapse into three values, and the probabilities follow the map: P(X=1)=0.50P(X = 1) = 0.50, while P(X=0)P(X = 0) and P(X=2)P(X = 2) are each 0.25.

"Blood type is a random variable" is the error worth naming. The output has to be a number, because everything done with a random variable afterwards is arithmetic. Blood type is a categorical outcome, so it does not qualify. Build a number out of it and you are fine: the count of type O donors among 20 arrivals is a random variable, and counts can be averaged. The related slip is writing P(x=2)P(x = 2) in lowercase, which asks about a value instead of about the variable.

Random variables split into two kinds according to the values they can take. Discrete ones have values you can list, and continuous ones take any value in an interval and get their probabilities from area under a density curve. That split decides everything downstream, including whether you add probabilities or integrate areas to answer a question.

Random variables are introduced at topic 2.8 of Unit 2, and their summaries, the mean μX\mu_X (mu-X) and the standard deviation σX\sigma_X (sigma-X), at topic 2.9, Parameters of Random Variables.

Full entry for random variable

Where each one fits in the course