[TYPING] Consider the following. Imagine two rooms. [DOOR CLOSING] [DOOR CLOSING] Inside each room is a switch. [CLICK] [CLICK] In one room, there is a man

who flips his switch according to a coin flip. If he lands heads,

the switch is on. If he lands tails,

the switch is off. In the other room, a

woman switches her light based on a blind guess. She tries to simulate

randomness without a coin. Then we start a clock, and they

make their switches in unison. [CLICK] [CLICK] [CLICK] [CLICK] Can you determine

which light bulb is being switched

by a coin flip? [CLICK] [CLICK] [CLICK] [CLICK] The answer is yes, but how? [CLICK] [CLICK] [CLICK] And the trick is to think about

properties of each sequence rather than looking for

any specific patterns. For example, first,

we may try to count the number of 1’s and 0’s

which occur in each sequence. This is close, but

not enough since they will both seem fairly even. The answer is to count sequences

of numbers, such as runs of three consecutive switches. A true random sequence

will be equally likely to contain every

sequence of any length. This is called the

frequency stability property and is demonstrated

by this uniform graph. The forgery is now obvious. Humans favor certain sequences

when they make guesses, resulting in uneven patterns

such as we see here. One reason this

happens is because we make the mistake of

thinking certain outcomes are less random than others. But realize, there is no

such thing as a lucky number. There is no such thing

as a lucky sequence. If we flip a coin

10 times, it is equally likely to come

up all heads, all tails, or any other sequence

you can think of. [CLICK] [CRICKETS CHIRPING]

1st View!

damn.

first comment! OMG I love you sal!

This is so awesome!

one of the first.

badass

LOL When I clicked on this I thought it was VSAUCE!

Interesting.

This actually makes me want to learn more about probability and statistics.

Really cool. I liked it.

Really interesting! Keep doing these videos, guys. Knowledge is a blessing.

very very interesting

This is really well done! If I had seen this on paper, I wouldn't have understood at all. But in two minutes, I feel like you've explained in fairly simple terms a very complicated idea!

Love the spooky music, I feel like I'm learning some big terrible secret.

THANK YOU. This is incredible! MORE of these please!

"if we flip a coin 10x it is equally likely to come up all heads, all tails or any other sequence you can think off". I had to think about that a little bit, given that the only thing I remember about statistics is the coin toss homework, 50% heads, 50% tails. So the probability of getting any one pattern in a 10x sequence of coin tosses is 1:1024, right? or is it 1:1023?

This is brilliant. If Khan Academy continue to produce such innovative education I wont get my kids into school……

If I didn't know the title of the video, I would say it has something to do with probabilities. I like it anyway 😀

One person chose at random.

@sachinabey Good question, you can use any length of sequence – 3 is just convenient. The graph gets very large with longer sequences since the number of combinations explodes.

really cool—the soviets used to generate code sheets by typing random letters on a typewriter—but their typists were not really typing randomly, they often just alternated hands—if plain text is coded using a random, non-repeating key, it is impossible to break—but if the key is not random (or cycles), then longer texts are vulnerable to crypt-analysis—i would love to know how non-randomness and/or cycles can compromise a cypher-text—please ♥

Any sequance have the random shape may gave one of answer

So it shows human nature is to favor certain patterns. Would a person who has seen this video be able to have a better chance at pretending to be random and thus not get caught ?

Example, in terms of trying to be random as a competition, you can play Rock, Paper, Scissors against an advanced Computer Algorithm. I have done very well against the computer by not thinking about what i'm gonna throw.

nytimes.com/interactive/science/rock-paper-scissors.html

Well, a sequence of all 1s is just as likely as any other sequence. Still when you are just looking at it as outcomes of 1s and 0s instead of the sequence, it seems it would be unlikely for the sequence to contain only 1s or 0s compared to the odds of having half of them being 1s and half being 0s. Which seems to contradict the statement about the sequence.

All of which makes the video much more interesting since it does not contradict the statement . The difference is just the perspective.

@kbponline If you think you understand this from a two minute video, think twice. This is actually much more complicated than that.

nice thank you …

How can this be applied to the lottery?

I've heard there's a Zen practice that involves placing ink dots on a paper in truly random positions–and practitioners claim it's virtually impossible for the "unenlightened" to accomplish.

Who's the narrator? Where's Sal?

Wow, incredible! I want to see more!

i love that it's an actual video of something. I understand something in 2 minutes way better. Thanks. awesome presentation

Really good video 😀

Spooky.

hello the $ ? is. All man are not created equal, so can they crate similar sequences or each individual will differ in their randomness

What is this like probability?

Wrong, not every sequence is equally likely to occur. Or to be more precise, in 3 flips of a coin, every combination of heads and tails is equally likely, but in a large amount of flips, the odds of getting a specific sequence of length 3 depends on the sequence.

"There is no such thing as lucky numbers". There goes my lottery ticket…

awwwwwwwwwesome. Humans are so bad at probability. Reminds me of Nassim Taleb.

I really liked this presentation. It's visually stimulating and thought provoking…it draws me in and I want to see more!!!!!

So if you were able to have an empty mind and told it to perform such a

task at random.

Would it stick to the mathematical randomness, or would it still have a bias on some patterns despite the fact that there are no thoughts in it's mind about patterns and what is, or isn't random?

A similar presentation was made in a probability class at Berkeley, with a different twist on the numerical trends. If interested, see the Radiolab archives & search for their episode on stochasiticity…

the physical act (of using the body to flip a coin) is also programmed but is stable because it is a physical expression without any conscious mind envolved

the conscious mind is not stable and does not produce stability

not even by impersonating randomness

Nice

@Kevill Random is a hypothetical concept. A construct of human imagination. I find it illogical. You're making a good point. A computer is like an unbiased mind and it can't be told to do something at random. It needs data. Just like every other event in the universe. Cause and effect.

khan academy should have more videos like this 🙂

@Theomacho so what's your point? If you can't predict it, it might as well be random. By the way, random variables can have a distribution that is non-uniform and there are ways to get very close to "perfectly" random.

this video is great

interesting simple 😀

@calbear2006

Thanks dude, i am learning electronics and telecommunications so i really need to understand these concepts, can you maybe give some other usefull links like radiolab?

Excellent demonstration

Well i can clearly see the art of this problem.

@vickiormindyb RON PAUL! 2012 FOR LIBERTY!

@SalsaTiger83 STFU

Its like having people spread randomly across a room. It cannot be done.

@kbponline It's because videos and graphics convey much more information than the text do, and you use both ur eyes and ears to process these information.That's why videos seem more "meaningful" thatn text.

can this be applied to computer generated random numbers?

@viorel22cr Yes this property is taken into account when measuring the 'quality' of pseudorandomness (machine generated).

Okay. Back to the video instead of praising khan academy, I'm sure it just wants to know how people feel of the video. Phrases such as "omg this video portrays things soooooo much cooler!" are so cliche. Get to the point.

I completely agree with this video. I don't think truly random numbers are possible.

thanks for your answer, but here is something extra, how is this true in relationship with time? I mean if you count sequences from time zero to time finish this property can apply , because you can count all possible combinations, but what about if you only count sequences in one hour? or two hours, and the light switches are spaced 5 minutes apart. I am working on such a problem and I'm searching for a solution. Thanks

Reminds me of the first few minutes of Rosencrantz and Guildenstern are Dead. 😉

Fascinating. I wanted to test this so I wrote a quick c++ program to run the simulation. I seeded srand with the system time and used modulus 2 to get a fairly random 0 or 1. A set of if statements checked to see which octal sequence showed up and counted them. I set it all up in a for loop to repeat 80,000,000 times.

I ran the program several times and the highest standard deviation I got was 4142. The lowest was 41. Those are really low deviations for 80mil random octal groupings.

My teacher did this where he asked some people in the class to truly flip a coin and write what they got and others to make up random sequences. He guessed who did what correctly each time by seeing if there were sequences of 6 heads or 6 tails in a row and determined this to be actual coin flipping. Really fascinating stuff.

Very good (and deep) question… I'll have an interactive exercise soon where you can experiment with this a bit more.

I LOVE this. PLEASE do more videos like this!

At first I thought I just clicked on this video randomly. Now I realize I favored certain sequences in youtube videos.

*switch off light*

how can he see what the coins says if the light is off?!?

This blows away the gamblers fallacy.

MORE CRYPTOGRAPHY VIDEOS

Most coins have indentations, by feeling the top of the indentation you can feel which coin you got. For example, heads will have a smooth center with a penny, whilst it shall be bumpy with tails.

What about the penny cherry flip(i think that's what it's called)

what about logic? if the woman flips the switch, she would have to go the opposite way because you can't flip a switch twice in a row, while still turning the light on or off?

you just feel the surface with your nail, smooth – head, rough – tails.

Anyone else think this is a bad example? The switch moves up and down and only has 2 options ON and OFF if you turn the switch ON how are you supposed to turn it ON again? The only other option after turning it ON is to turn it OFF… therefore the pattern has to be ON-OFF-ON-OFF-ON-OFF…etc.

If you get heads twice, you simply leave the light on for two steps(1, 1), if you get tails twice you leave it off (0,0). Notice it's being sampled according to a clock tick.

I personally prefer the true khan videos.

Great lecture Khan Academy!

We can't even try to be random, nor computers! Actually the ability to build a random number with a computer is a very complex algorithm which is widely used in security protocols and encryptions. :O

I always wondered if humans could generate something truly random. I wonder if you could train someone to be random.

gr8

Awesome Educational stuff man!

sikiyim, korku filmimi dersmi belli değil amk, gerdiniz adamı ya

you can make a truly random number generator if you had a dice with n side and each side has equal weight and equal chance of landing on a given face and land on a flat surface then you have a machine that reads the face facing up however it is impossible to make a dice that has equal sides and equal weight distribution because some sort of gravity is pushing the dice in unequal forces and perfectly flat surface is impossible because of gravity, nuclear forces, electromagnetism

Two questions: 1. should the window sequence overlap or not? 2. why window size of 3 was choosen? Complete question is here http://stats.stackexchange.com/questions/154502/frequency-stability-property

I love this series, but the background music is 2spooky

…. and how does he see the coin when the light is off?

wow such education

1:37 the forgery wasn't obvious to me, can someone tell me which sequence was fake?

As mentioned, the forged one is the one with uneven frequency of different sequences (the top one) and a truly random is supposedly contains an equal number of different sequences, though it is difficult to believe..

Great Video. Spooky audio.

Author asks, can you determine which light bulb switched by flipping coin and then says answer is YES, but I followed both light bulbs and cannot figure it out, can somebody answer this question thank you.

i dont get it

This is a simple, excellent video. Thank you!

wow thats so cool

what background music is used?

the room with coin always 0, he lost the coin in the dark