If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Random variables

Basic idea and definitions of random variables. Created by Sal Khan.

## Want to join the conversation?

• At , could you define the variables Heads and Tails using the numbers 1 and 2, and then stating 0 as a value that cannot be an outcome. • I'm a bit confused; how can we decide if something is a random variable or not? • As the word suggest that Random means any number (in mathematical terms) and variable means whose value can change all the time and takes up the value which you assign to it (in Computer science terms though context is same in both and maths). So Random Variable means that for any event if you are calculating the value you may assign it to a variable randomly. To make it simpler further let's say here in example we are using roling of dice, so we cannot predict before hand which face would be up so it means random. Now let's say on first roll we get 2 then on subsequent rolls 4 then 5 then 6 and so on. So you see we are getting random faces up for the dice and we cannot predict if on the next roll it would be 3 or 5 or 6 or 2 or whatever. I hope this explains the concept of random variable. There can be 2 types of Random variable Discrete and Continuous. Discrete which cannot have decimal value e.g. no. of people, we cannot have 2.5 or 3.5 persons and Continuous can have decimal values e.g. height of person, time, etc..
• Could you explain the difference between random and arbitrary? And also, how it relates to probability theory? • From the Oxford English Dictionary:
Random (Statistics): Governed by or involving equal chances for each of the actual or hypothetical members of a population; (also) produced or obtained by a such a process, and therefore unpredictable in detail.
Arbitrary: Derived from mere opinion or preference; not based on the nature of things; hence, capricious, uncertain, varying.
When someone says "pick a random number", the following definition might apply:
"Having no definite aim or purpose; not sent or guided in a particular direction; made, done, occurring, etc., without method or conscious choice; haphazard."
• At Sal defines a random variable X as 1 if heads and 0 if tails. If he had defined X as H if heads and T if tails, would X be a random variable? Why or why not? • Then H and T would be random variables. The reason you want to adress numbers to them is that it becomes easy to deal with the possible outcomes. Imagine i have two coins and i use the definition sal gave for X. I flip the coins 100 times each and write down the results. then i want to know wich coin varied the most. For this problem, i could use the standard deviation concep. comput my results and see wich coins has a greater tendency for dispersion. Quantifying the events gives us that much power to better analyze them.
Hope this helped!
• what does he mean by rolling 7 dice?? is it that the dice is rolled 7 times?? • Yes - he mean taking one die, rolling it seven times and summing up each result into a total. (You could achieve the same result by rolling 7 dice all at once. ) For example you roll a 5, then a 3, then a 2, then another 5, a 1 , a 2 and a 4. The result is 5+3+2+5+1+2+4 = 22. That is the process. Repeat it many times and you get a sample set.

The probabilities he mentioned are , when doing that process 1) what is the probability that the results is less than 30 and 2) what is the probability that the result is even.
• Is the difference between a variable 'x' and a Random variable 'X' simply that x represents a single number, whilst X represents a set of numbers? So by quantifying the results, you mean that X contains a numerical value for each possible outcome for the random process. • Well, variables don't have to be single numbers. Take the equation | x | - 4 = 0. If the absolute value of x minus four equals zero, then both negative four (-4) and positive four (4) are correct. However they are fixed values which can be solved.
The term "random" in random variable really says it all. You can't determine what the result is, rather you can express probabilities of certain outcomes. For instance, with normal variables, if I want to know what the variable x must be to make y = 0 in the function y = x -7, you simply plug in numbers and find that x must equal 7.
But if you wanted to say X = the sum of two six-sided dice, but put it in the same equation, so y = X -7. You come to the same results of knowing X must equal 7, however you're incorporating elements (The two dice) which no longer can simply be substituted with a fixed number. So a more logical question involving the Random variable becomes, what is the probability that X is equal to 7.
Realistically the point of the Random Variable is to define the set of outcomes (The results of two six-sided dice summed in this example) in the shortest way, to make the notation of the math as simple (And easy to write out) as possible.
• What exactly is a "random process"? Is tossing an unfair coin a random process? • Is a random variable a function? If so, is it possible to plot it ?   