HomeОбразованиеRelated VideosMore From: Khan Academy

Frequency stability property short film | Computer Science | Khan Academy

1284 ratings | 386842 views
Can you tell the difference between actions based upon flipping a coin and those based upon blind guessing or simulating randomness? This short video examines the frequency stability property. Watch the next lesson: https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/case-study-ww2-encryption-machines?utm_source=YT&utm_medium=Desc&utm_campaign=computerscience Missed the previous lesson? https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/one-time-pad?utm_source=YT&utm_medium=Desc&utm_campaign=computerscience Computer Science on Khan Academy: Learn select topics from computer science - algorithms (how we solve common problems in computer science and measure the efficiency of our solutions), cryptography (how we protect secret information), and information theory (how we encode and compress information). About Khan Academy: Khan Academy is a nonprofit with a mission to provide a free, world-class education for anyone, anywhere. We believe learners of all ages should have unlimited access to free educational content they can master at their own pace. We use intelligent software, deep data analytics and intuitive user interfaces to help students and teachers around the world. Our resources cover preschool through early college education, including math, biology, chemistry, physics, economics, finance, history, grammar and more. We offer free personalized SAT test prep in partnership with the test developer, the College Board. Khan Academy has been translated into dozens of languages, and 100 million people use our platform worldwide every year. For more information, visit www.khanacademy.org, join us on Facebook or follow us on Twitter at @khanacademy. And remember, you can learn anything. For free. For everyone. Forever. #YouCanLearnAnything Subscribe to Khan Academy’s Computer Science channel: https://www.youtube.com/channel/UC8uHgAVBOy5h1fDsjQghWCw?sub_confirmation=1 Subscribe to Khan Academy: https://www.youtube.com/subscription_center?add_user=khanacademy
Html code for embedding videos on your blog
Text Comments (107)
Danny Kusuma (9 days ago)
the room with coin always 0, he lost the coin in the dark
CoolBeanz & Friends (27 days ago)
what background music is used?
farooq shaik (5 months ago)
wow thats so cool
Hanlyu Sarang (7 months ago)
This is a simple, excellent video. Thank you!
Goutam Biswas (9 months ago)
i dont get it
Sherzod Rashidov (10 months ago)
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.
Vijaykrishna Abba (2 months ago)
Same question
Molaga (1 year ago)
Great Video. Spooky audio.
Raja Piduri (1 year ago)
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..
Lequexo (1 year ago)
1:37 the forgery wasn't obvious to me, can someone tell me which sequence was fake?
doge (2 years ago)
wow such education
Jenrose (3 years ago)
.... and how does he see the coin when the light is off?
Ambar Mondal (9 months ago)
Downtime (1 year ago)
Meagan Boodoo (2 years ago)
AdeAde (3 years ago)
+Jenrose this is the true question!
Joe Dolan (3 years ago)
I love this series, but the background music is 2spooky
doge (2 years ago)
+Joe Dolan wow such spooky music #3spooky5me
cepi24 (3 years ago)
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
luis fuentes (3 years ago)
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
Felipe Vasconcelos (2 years ago)
You can make nuclear randomizers.
Adil Can Balçık (3 years ago)
sikiyim, korku filmimi dersmi belli değil amk, gerdiniz adamı ya
P S (4 years ago)
Awesome Educational stuff man!
Alok Mistry (4 years ago)
LimitedWard (4 years ago)
I always wondered if humans could generate something truly random. I wonder if you could train someone to be random.
Sam Schreiber (2 years ago)
+LimitedWard You cannot simply train someone to be random, you must be born cabbage monster truck.
P S (4 years ago)
It cannot be trained, to be random. If it can be taught then it again falls on the idea of a controlled outcome rather than random. Random is random.
Andrés Koszutski (4 years ago)
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
DJArthroOFFICIAL (12 days ago)
+srikavya balu well i´m pretty sure that randomfunction is pseudo-random and not real random
srikavya balu (8 months ago)
Andrés Koszutski in fact not that much, I'm an pythonist and it's really easy for me to generate a random number Code is : Import randint Range(1,2,3,4,5,6) #enter This will generate an random nber:)
Chris Johnson (5 years ago)
Great lecture Khan Academy!
Miles Rout (6 years ago)
I personally prefer the true khan videos.
Art of the Problem (6 years ago)
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.
IsaiahMang (6 years ago)
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.
monofono2006 (6 years ago)
you just feel the surface with your nail, smooth - head, rough - tails.
Mugi - Chan (6 years ago)
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?
jamesusespivot (6 years ago)
What about the penny cherry flip(i think that's what it's called)
Nersius (6 years ago)
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.
ggmm117 (6 years ago)
rhoadess (6 years ago)
This blows away the gamblers fallacy.
MrElwoodBluez (6 years ago)
how can he see what the coins says if the light is off?!?
testtest (6 years ago)
At first I thought I just clicked on this video randomly. Now I realize I favored certain sequences in youtube videos. *switch off light*
Rangha Hathakama Goya (6 years ago)
I LOVE this. PLEASE do more videos like this!
Khan Academy Labs (6 years ago)
Very good (and deep) question... I'll have an interactive exercise soon where you can experiment with this a bit more.
Mark Goldberg (6 years ago)
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.
Fm86 (6 years ago)
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.
sanguinarabbita (6 years ago)
Reminds me of the first few minutes of Rosencrantz and Guildenstern are Dead. ;)
viorel22cr (6 years ago)
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
Umair166 (6 years ago)
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.
Art of the Problem (6 years ago)
@viorel22cr Yes this property is taken into account when measuring the 'quality' of pseudorandomness (machine generated).
viorel22cr (6 years ago)
can this be applied to computer generated random numbers?
Hiya (6 years ago)
@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.
weckar (6 years ago)
Its like having people spread randomly across a room. It cannot be done.
Gama Isora (6 years ago)
@SalsaTiger83 STFU
Gama Isora (6 years ago)
@vickiormindyb RON PAUL! 2012 FOR LIBERTY!
jlennardz (6 years ago)
Well i can clearly see the art of this problem.
Goofmobber (6 years ago)
Excellent demonstration
glavgad (6 years ago)
@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?
Marcus de Marulis (6 years ago)
this video is great interesting simple :D
SalsaTiger83 (6 years ago)
@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.
andreirocks1992 (6 years ago)
khan academy should have more videos like this :)
Theomacho (6 years ago)
@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.
Mattan (6 years ago)
Ricardo C. {authmaax} (6 years ago)
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
calbear2006 (6 years ago)
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...
Kevill (6 years ago)
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?
Brian Cruise (6 years ago)
I really liked this presentation. It's visually stimulating and thought provoking...it draws me in and I want to see more!!!!!
nightpotato (6 years ago)
awwwwwwwwwesome. Humans are so bad at probability. Reminds me of Nassim Taleb.
Hot Pepper Lala (6 years ago)
"There is no such thing as lucky numbers". There goes my lottery ticket...
imorio (6 years ago)
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.
Justan Edwards (6 years ago)
What is this like probability?
pavelavietor1 (6 years ago)
hello the $ ? is. All man are not created equal, so can they crate similar sequences or each individual will differ in their randomness
Mark Smith (6 years ago)
Alex Jubb (6 years ago)
Really good video :D
Eric Pottenger (6 years ago)
i love that it's an actual video of something. I understand something in 2 minutes way better. Thanks. awesome presentation
thegoodplace (6 years ago)
Wow, incredible! I want to see more!
DeluxeWarPlaya (6 years ago)
Who's the narrator? Where's Sal?
GetMeThere1 (6 years ago)
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.
Raffi Melkonian (6 years ago)
How can this be applied to the lottery?
josefwurst (6 years ago)
nice thank you ...
Nomoreidsleft (6 years ago)
@kbponline If you think you understand this from a two minute video, think twice. This is actually much more complicated than that.
Kasper S. Olesen (6 years ago)
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.
freydawg56 (6 years ago)
freydawg56 (6 years ago)
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.
Ammar Mostafa (6 years ago)
Any sequance have the random shape may gave one of answer
Gerard Vignes (6 years ago)
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 ♥
Art of the Problem (6 years ago)
@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.
Jared Karcher (6 years ago)
One person chose at random.
DoXz40 (6 years ago)
If I didn't know the title of the video, I would say it has something to do with probabilities. I like it anyway :D
Rana Reda (6 years ago)
This is brilliant. If Khan Academy continue to produce such innovative education I wont get my kids into school......
E Pilobello (6 years ago)
"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?
Rangha Hathakama Goya (6 years ago)
THANK YOU. This is incredible! MORE of these please!
isakoqv (6 years ago)
Love the spooky music, I feel like I'm learning some big terrible secret.
Nick Bacon (6 years ago)
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!
Killuminatismd (6 years ago)
very very interesting
TyuCytrus (6 years ago)
Really interesting! Keep doing these videos, guys. Knowledge is a blessing.
Lex Howard (6 years ago)
Really cool. I liked it.
Kinetics (6 years ago)
This actually makes me want to learn more about probability and statistics.
uniconism (6 years ago)
LOL When I clicked on this I thought it was VSAUCE!
tittiez (6 years ago)
NavjotGraphicDesign (6 years ago)
one of the first.
Ben Voorhees (6 years ago)
This is so awesome!
uniconism (6 years ago)
5gunpowder4sand (6 years ago)
first comment! OMG I love you sal!
Tyler Critchfield (6 years ago)
1st View!

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.