1. Home
  2. Explore
  3. Mathematics
  4. Probability for Computer Scientists

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Probability for Computer Scientists

Transcript

good afternoon cs109 and welcome to the first day of fall quarter hey I have not gotten to I was studying abroad in Spring which means I haven't gotten to start a class in person since pre-pandemic and boy does it feel good I am so happy to see you guys oh welcome welcome to cs19 if you didn't expect me to say cs109 this is your time to find that cs103 class or that uh cs121 class that you might be looking for but if you're looking for a cs109 this is a place coming in grab a seat I am Chris

and we're going to be learning about probability for computer scientists okay shall we jump in gather around I have such a story to tell you guys today and it's a story that computer scientists know it's a story that mathematicians should know but certainly it's probably also a story that um all people should know to some extent but before I get into that I think I should introduce myself hi I'm Chris I'm a professor here in the computer science department I'm also in the school of education I'm in both places um I teach and I research and I have a good time I have a research lab it's AI for social good we mostly do education and some medical work as well uh I love to teach I teach 109 I teach 106a I'll teach cs398 I'll teach anything uh that I can that I'm equipped to teach um a small detail but um I've been here for a while I actually originally was born in Kenya when I was 12 I moved to Malaysia and then I came here when I was 18. and I liked it so

much that I just decided to stay um and because I've been here for so long I was actually here as an undergraduate and after undergraduate I stayed for my PhD after my PhD they're like you want to teach her I'm like yeah that sounds cool so here I am um when I was an undergraduate I actually had the honor of being in the world's very first cs109 class it was a brand new class When I Was An undergraduate I got to take the very first one and look I was so young anyways and I've been teaching for quite a long time wow 2014. it's been a great great run so I love teaching and a lot of my research actually involves teaching because I love it so much one of the things that I did during the pandemic is we taught 20 000 students intro CS around the world and we got the world's the class with the most teachers in the world we got trained 2 000 people up to teach and they taught 20 000 students and it was a good vibe it was just like

a little bit of community service and then time pandemic um that also gives me a chance to tell you a little about some of the research I do we taught these 20 000 people how to program but one of the things that I'm intellectually curious about is how can we understand humans who are learning uh and so one of the things we tried to do is said okay students are learning how to code can we look at their code and use some AI to analyze it and give feedback and we had this nice little result for the first time ever for something as complicated as open-ended code we're able to give feedback that students preferred uh to TA feedback it showed up in the New York Times amongst other places problems I'm also really interested in how AI can help teachers teach better and give and how they could improve their craft we tried all this stuff in code in place and we've found ways that we could make teachers even better at what they do and that just scratches the surface of how

many cool problems there are in the world um you know I'm into things like measuring how well people can see I'm into things like can we figure out fairness in artificial intelligence the world is so full of things to be curious about and whether the joys of being at Stanford is I get to think about all these wonderful diverse things um outside of academics there's a whole bunch of things I love too I love music I love playing guitar Kenya and Malaysia have some of the best food in the world and I will argue with anybody that our Cuisine is better I'm just joking I love food I love cooking and I just love science the last winter I went into the forest and I found this wood covered with this ice that was in the shape of hairs and like our world is such a beautiful beautiful place um this is kind of a big deal in my life I do a lot of research I do a lot of teaching and then I've got this little baby and so this summer was like research half day teach half day and

then like make airplanes out of cardboard uh which is like a total Joy I'll tell you all about her okay that's a little bit about me but I'm just one of the people who's gonna be teaching you cs109 cs1 is an incredible 109 is an incredible course and one of the things that makes it so amazing we have such an awesome team of uh Tas who are going to be helping us through this journey and learning probably are there any here today hey we got a corner of Tas everybody round of applause these guys are the heart and soul of the class thank you guys for what you do [Applause] okay I really want to get into content but I do want to give you the most important pieces of course mechanics but the number one thing to take away from today is we have a course web page it's cs109.stanford.edu all the course mechanics I mentioned you can go find on that course website and you can go look at the Nitty Gritty details for things that you're curious about

though we should talk about some of the things one of the things you might be curious about am I in the right place there's a lot of questions about prerequisites and I just want to give you an idea of what we actually are going to be basing cs19 on top of we really really assume that you know cs106b coding we are going to talk about things like recursion hash tables binary trees and also we're just going to assume a certain maturity in coding some people have managed to take cs106b alongside cs109 uh that's fine but it's just a really really important prerequisite a less important prerequisite is cs103 uh we just use some light bits of cs103 and they mostly show up at the beginning of class in fact one day I was curious I there is all this card of data and I was wondering how do people do in cs109 if they've never had cs103 before and how do people do if they hadn't and I found the surprising result that if you didn't have cs103 you did slightly better in cs9 now

as we'll talk about causality later in this class but it's certainly not causal it's probably just people who are willing to skip cs103 might be coming from a different population but long story short we really don't rely too much on the material from cs103 we do rely heavily on material for math 51 or CME 100. you know you're going to want to know what a partial derivative is we are going to teach you multivariate integration if you hadn't seen it before you'll see it in cs109 you know a lot of the stuff I'd if you get there and you're Rusty on it we're gonna help you but this is just what we're assuming coming in and certainly just some notation we hope you're a little bit familiar with uh if you just really really want to take cs109 uh come and you don't feel like you completely mastered all the prerequises just come talk to us we're happy to have that conversation so yeah you're in the right place um cs109 is a math course but we discovered a while ago that math can really Bloom

when you can create things using math not just solve problem sets but make real things and to that end we are going to use the math that you learn in this class to make stuff and python is going to be the language that you use to make things in cs109 some of you probably seen python before some of you haven't if you haven't seen python that's absolutely fine we're gonna have review sessions to catch up on what you need it's a beautiful language certainly something you should know by the time you graduate worth it come to the review sessions as long as you've seen some programming python is one of the kindest and gentlest programming languages that you could learn okay oh this is a very small thing you know that there is a unit choice in Access there really shouldn't be because there's not really a choice it's a deterministic decision mostly start here are you an undergraduate yes very simple five units if you register for Access for less than five

units I get an email per student which is a lot of emails let's say you're not an undergraduate then ooh do you want to take cs109 for Fiora units no guess what five units but if you did want to take cs1i for fewer units I'm here to let you know that you can if you're a graduate student if you take it for three years or four units the workload doesn't change uh it's the same amount of work for fewer units that's just life in grad school uh welcome to adulting anyways the really quick note on units so it's a five unit class uh the way Stanford units works is about three hours per unit so you can imagine uh we're going to be spending about 15 hours per week on cs109 uh and a large large majority of that will be you guys doing your own work so 10 hours for assignments a few hours for lecture and a few hours for section speaking of which what are the components of this wonderful class well as I mentioned one of the biggest components is assignments you guys will

make things you'll derive things you'll practice your art form of understanding probability and that will be done uh in your assignments and that's a good chunk of cs109 and a good chunk of your grade we do have exams we have a midterm and a final exam you should show up they're both going to be a good time we put a lot of love to try and make it an educational uplifting experience I'm not really here to judge people I want you guys to grow and improve as and hit your potentials but anyways the final exam we were told by the university do it then and it's very very very very very very very very very very very close impossible to change only if you're like a senior who's graduating this quarter are there does the University make exceptions the midterm we have a lot more leeway on if you can't make this time you just let us know close uh to the date and we'll figure out something for you so anyways we have these exams if you're in a class that's at this

exact same time your exam is probably at the exact at the same time and you definitely want to solve that problem now not at the end of the quarter okay and then one of my favorite things about cs109 it's fun to come to lecture you guys should come to lecture we were going to have a good time we're going to do demos we're going to tell jokes we're going to laugh hold hands sing Kumbaya now we're not going to do that last part but we are going to learn a lot of probability um but one of the best parts of the classes then you get to meet in small groups with one of our excellent World expert Tas who will walk you through the concepts so you can practice it before you go off on your own into problem sets uh it's a beautiful lecture than section then do your work I got this question a lot is this class online uh it's recorded these wonderful cameras we have an amazing amazing amazing scpd team that's doing professional recording of these classes

uh they'll be released about 24 hours later so there's a few things to say about that I love the recording you get sick you can watch it later you didn't catch something you can watch it later realistically though some people are gonna be like oh man my club really needs me to do XYZ and I'll just catch up on lecture later and we've all Fallen to that trap so I want to talk a little bit about you know the query we did about people who had um who had or hadn't done one of three we can do the same thing based on how people are watching uh lectures and we know that coming to lectures people do about a grade point hires again not causal but come to lecture it's a good time it'll help you stay on top having said that I do think of you guys as adults you're adults of course I think if you as adults um and to that extent you're in charge of making sure you know this material you know find your way it's just coming to lecture we know is one of the best ways to do that

um and but I will leave it to your own devices to how you're going to get to the end of the score you probably have questions in fact somebody from right now if you have an electric you just raise your hand and we'll get amongst it there are other ways oh yeah um the grading breakdown and the slide is slightly different than the syllabus which one is like oh definitely the one in solos what did I get wrong here 40. ah yeah I was gonna reveal that on Wednesday no no no no no no that's great that's great um okay well okay the reveal is going to come today so I was thinking about this slide and I was like well I want you guys to make your own decisions I don't want to penalize people I don't want to put in um uh something that to force you to come lecture but I do know that coming to lecture is generally good for you guys learning the material better so I was like how could I incentivize this in a nice and healthy way so what I was going to do is I was going to put like a

really chill like you know code on the the board and you can record if you came to class and if you come to most of the classes then I'll just slightly decrease how much your final weighs into your grade and I'll just give you full points for that so just a small way to encourage participation if you don't do it can you still get 100 in the class absolutely like if you never show up to lecture but you show up to all your sections that is important and then you come to the final and you just rock it you're like yeah I can do all this probability you can get 100 in cs109 but uh we know that the more reasonable path to that coming to lecture participating so we're going to incentivize that and I'll give you all a little bit more details about that on Wednesday but very very very good question okay you might have other good questions where are you going to ask your good questions well you guys know q a forms by now we use Ed instead of sending us

an email often it's better to post and a lot of people will read that and get back to you as soon as possible one of the great places to go ask questions is in person we do working office hours on cs109 so you don't even have to have a question you just go with your problems and be like I'm gonna work on my problem set and then when you have a question you're already there what a time to be alive so it is working office hours they're going to start on Thursday and we have a lot all of our Tas are doing four office hours we've got so many off stars for you guys because we want you to get the help when you need it so working off star is one of the great places to get help and you can also always email that email address and that goes to me and all the Tas and we can get you any help if you have anything private that comes up that's going to happen to some people you can email me in the head ta will directly and I also have one-on-one office hours as opposed to group office hours so you can come and ask me just questions there okay questions on questions how meta

oh this is so cool I first started writing lecture notes for all my classes like okay what did I talk about today and then over time it became an entire reader so now I have an entire reader for you I finally finished it last year but now there's a cs19 reader it goes over a lot of the concepts we talk about in class um but just in a written form if you like there's this thing called an ace companion course it's fantastic if you want to take more units to cover this material and get some more examples you can take the ace class there's a application form and you can learn more about it by following the link it's both in the slides and on the home page of cs19 you guys want to see our homepage it's really not that beautiful but I designed it I'm not a designer and I feel really good about some of the small details it's not that important right now what is important though uh is that link is right over here so if you want to apply to Ace there it is

uh and then I didn't go over all the details but for all the details the way you get all this information is on the course website uh under the course there's the syllabus and you can read oh our wonderful Tas and you read all about the details about the course structure and we go into all the nitty gritty anxiety any other questions shall we let's do it I want to tell you guys a story and I would like to tell you the story of modern air and boy has it become interesting in the last year so modern AI has this really interesting story but if I had to give it a subtitle it would be how we learn to combine probability and programming together to do very interesting things but I think I should give some historical context you know people thought AI would be a very easy problem and a I'm going to speak

about broadly just computer is doing human level intelligent things we thought this would be simple in the 1950s computers start to do some awesome things we got computers that could beat any human in checkers and then we got computers that could do automatic proofs like you know imagine the sort of proofs you would do in cs103 you had computers that could start to do automatic theorem proving and we're like yeah we're awesome AI gonna be super simple and it led to ridiculousness for example Herbert Simon uh one of the leading AI researchers in 1952 said this ridiculous thing on a grant that he won that was worth the equivalent of like half a billion dollars today he said machines will be capable within 20 years of doing any work a man could do which is ridiculous for two years like or two reasons like 1952 all the work a man can do geez get with the times uh and then the other things like imagine 1972 rookie machines able to do this no

they're basically like big calculators by 1972. completely wrong you just thought the world was pretty simple his Grant was like first I will solve language and then once I've solved language then I will solve free thoughts this is ridiculous anyways he didn't get past language he started with translation uh and this was he made this thing a good translate from English to Russian and and one of the funny examples was you could put in something like the spirit is willing but the flesh as we can get translated to Russian I didn't understand Russian so I didn't include it here but then you can take that Russian and put it back to English and see if it did a good job it's like the vodka is good but the meat is rotten which is funny but not at all the input sentence and you know what had happened the world's just too complex what did he try and do he tried to write all the rules of English to Russian he's like I'm just gonna spend this money we're getting a lot of people will write all

these rules once you've written all the rules then we'll have a translation system but it turns out the world is so complex and we don't understand it because we have these beautiful probability machines called brains and these beautiful probability machines have so much power and they're so good about thinking about uncertainty that we think uncertain problems are easy but they are not as exemplified uh by Herbert Simon and then we called we got what we call the AI winter and for decades no one would fund anybody not just Herbert Simon uh anybody who said their AI they'd be like but obviously the AI winter is over and something's going on you guys probably know a lot about it a lot of its history started here for example this is a picture of Stanley a car made at Stanford which was one of the very first self-driving cars so in 1997 we started to win at chess in 2005 we got cars that could drive themselves in 2011 we had computers that could play Jeopardy something had

started to change and obviously we know that that was just the beginning you know when I was in your seats crazy thing someone told me there's this problem called Speech the problem is you get an audio recording of someone's voice and then you have to write the transcription of what they said that's the problem of speech when I was in your seats someone told me this problem will not be solved in your academic lifetime I was like whoa what a hard problem but of course it has been solved we're very very very good at that in fact my my phone right now can do transcription for my voice into written text something really big can change between when I was in your seats and now you know board games yeah we're done with board games and in fact the people got so good at board games were like let's do something real with this technology and then started protein folding if you don't know what protein folding is is this very hard task of

taking the amino acid sequence and then figuring out the 3D structure and if you could do that you could develop drugs faster you could understand our bodies faster it is a very interesting and wild world but it's such a hard problem to figure out how amino acid will become a 3D structure that we thought you know we won't be able to do it but as of a couple years ago not only are we good but we have we've come up with a 3D structure for every single known amino acid sequence in some popular database which I can't remember the name of but you know AI is not just those flashy things AI is also in our day-to-day lives like when you say I want to go from San Francisco to Mexico City and you get this route and it's a little bit of artificial intelligence that's helping you figure out your path and you know translations got a whole bunch better than when Herbert Simon was working on it if you're in Silicon Valley or self-driving cars well

actually I have no idea how they're doing they haven't hit me yet okay and you know it's always been an exciting time but then this year everything seemed to change once again this is just kind of like a timeline since May um and all of a sudden we've started to get these huge results in artificial intelligence in a world that people are starting to call large language models but basically they're these like half billion dollar AI systems that people have started to make public for other people to use I was playing with my 18 or not 20 month old daughter uh a little while ago and we opened up one of these AI systems these AI systems can do different things the one we use would take text and when you wrote text it would infer the distribution of that text it would then go figure out what is the probability distribution of all the images that relate to this text conditioned on what was written and then it can sample you a few different images from that

probability distribution that's insanity but for my 20 month old daughter it's just like she writes three birdies happy and she gets this picture or she writes you know robot Messiah and she gets this picture out in fact have you guys seen this is anyone who's not seen this live do you guys want to see it I need a prompt though uh let's say a rabbit and a giraffe in an airplane so this is a one AI model called dully it's going to take that sentence it's going to try and sample

from the probability distribution of images related to that sentence and this is something that came out about six months ago we can also oh there you go and he constructed these images oh that's so cute look it's got like a little heart there ah okay and these aren't pictures found on the internet you know it just constructed those pictures from scratches thinking about probably distributions over images what a time so much is happening so fast and every problem that's gets solved seems to open up a whole bunch of open new problems oh so hopefully at this point I've convinced you that stuff's happening but you might be curious like Chris what's really going on under the hood well I'm going to start telling you that story now but really cs109 is a class where we're going to understand this story more deeply oh a little bit of suspense this is so fun to have been starting a class in person for so long okay let's focus on one problem uh this is the fun

problem called Chihuahua or muffin you may think it's easy but you know originally when I was working on AI this would have seemed like an impossible task uh first of all let's just take a moment to appreciate how smart we are as humans and feel better than the machines for a moment okay just yell it out loud you guys are good a little tricky because the blueberries arranged like eyes and but you're right it is in fact a muffin okay how about now that was very impressive okay humans are getting smarter too you know why is this problem so hard it's like when you're seeing this it's hard to separate the fact that you have billions of neurons which are activating and they're lighting up in response to your retina you're having this experience of Chihuahua but that's a huge amount of processing that leads to the experience of Chihuahua for both your eyes and for computers it starts like this you either have Retina

responses or in the case of a computer vision you have pixel values and you have to understand what's in an image just from Pixel values you just look at those raw numbers it is very hard to tell we have this thing called a visual cortex and about 30 of your brain is dedicated to seeing so when you perceive the world you have a huge huge mechanism that is behind that what seems easy to you is actually using one of the world's most powerful computers okay I'm going to show you this example using numbers this is going to be my hard example what digit is this oh no it's supposed to be a zero I really did choose a hard one and how about this one okay it's a little bit easier for I mean instead of Chihuahuas and muffins I'm gonna do uses yours and one's a little bit more straightforward you know you can imagine one of the AI tasks that you can do is to build an algorithm which can detect Chihuahua or muffin Oregon techs are one or a zero that's hand drawn it's a classification

algorithm it looks at a picture and it classifies it as either group a or group b or in this group group one or group zero so we're going to make this AI algorithm we wanted to look at a picture and say something like this is a picture of one and look at this picture and say something like this is a picture of a zero that's our goal this particular AI algorithm task is called classification um it's not always perfect AI doesn't have to always be perfect but we want it to be fair and we also want it to be about as accurate as possible Okay so how could we do this we're not going to go down the Herbert Simon approach we're not going to try and write all the rules of what makes for a one or a zero we're not going to try to write all the rules of makes for a Chihuahua or muffin it just turns out this approach doesn't work the world is too complicated so instead let's use some insights I'm going to tell you two great ideas one is artificial intelligence artificial

neurons as simple probability machines and then this idea of learning by examples shall we let's do it okay our brains are smart we have neurons so can we make a cartoon model of that here is a cartoon model of how your brain works you've got billions of these things called neurons neurons get inputs those inputs lead to a buildup charge in the nucleus of the neuron and if that charge gets big enough the neuron starts firing those inputs get weighted differently so your brain can decide to pay attention to some neurons more than other neurons uh and and that's kind of your cartoon model we can build a cartoon version of this and in fact we have done that we build these cartoon models they have inputs each input can be weighted and then we're going to start firing or not firing in fact when we build these cartoon models we built probability Theory into it from first principle so we interpret the output as a probability

of firing or a probability of not firing this was a great idea and this idea changed the world not because you can get intelligence from one neuron but because you can start to put them together just to walk you through this metaphor really quickly these cartoon neurons that have inputs those are like the inputs to a human neuron and those could have different values every value we're going to wait and then we're going to sum up all the weighted values and once we sum up all the weighted values you know you can imagine it's like this little nice little mathematical Foundation where again then put it through a squashing function that gives an output that looks a little bit like a probability I said a whole bunch but at the end of the day this is a very digestible model if you spend you know 10 minutes looking at you it starts to feel a little bit comfortable you know a little cartoon model inputs get weighted some squashed think of the output as a probability

that was our cartoon model of a neuron but the beautiful thing about these is you don't get a lot of intelligence from one neuron you get a lot of intelligence from putting a bunch of neurons together and so people started taking these little probability Lego blocks and putting them on top of each other and you could put a bunch of them together in a computer and you can end up with a bigger probability machine sometimes we'll represent it with layers like you have your input layers and then layers of hidden neurons and then a final layer and people would build these probability machines they would make the inputs equal to the pixel values and then they would try and get neurons in the middle to Fire and not fire and eventually they would have a very final neuron and that very final neuron would end up with a probability output and we would interpret that as a probability of a classification it was a good idea and you know people would make these bigger and bigger and bigger I won't go I won't go into oh let's take a look do you guys want to see one

oh yeah blocked okay that's okay the picture captures it uh and yeah so people would build these huge neurons neural networks this is a visualization one where you have hand-drawn digit here and then you just have these layers of those tiny little blago blocks I describe they're tiny little probably uh units stacked on top of each other and they would each be Computing some probability on top of previously computed probabilities at the end we would have a bunch of neurons which would represent either this is a zero or one two three four five six

seven eight or nine it was a simple model but you know I've told you about this model I've given you no reason to believe that it's intelligent you can make this model you guys could code it up but where does the intelligence come from the intelligence is embodied in this model where does it live and the answer is it's in these weights you know how you set these weights can make you can construct this whole Lego structure of these probability units and the intelligence will come from having well set weights if you have well set weights you can have good probabilities which have meaning well if you could get perfect weights you'd have intelligence do we hire grad students to go and just like fiddle around with those weights no it'd be great if we could get those weights in a more automatic way which leads to our second great idea learning by example humans have beautiful brains but we also have this experience of learning by trying things you know we're not always just given uh

rules on how the world work we go experience the world and we get smarter through experiencing and so there was this great idea in probability in the 90s which was let's learn from example so imagine a single neuron you have these weights if they were the perfect weights it could be a smart neuron if they're random weights it's not a smart neuron and we want to get those weights to be really smart you know what people did they would take examples you know take this zero turn on your neuron have it fire and then if it was wrong like this case it predicts it's a one when really it's a zero what we would do is we would say hey algorithm could you adjust your weights so that you would be a little less wrong and the algorithm is like you know what I can you know why because I'm based on probability Theory because I'm based on probability Theory I can formulate that request mathematically and since I can formulate that that request mathematically as a computer I can do

that I can take this input this example and I can change my weight so that I could have been smarter uh and if you do this a little bit over and over again and just get a little smarter every time you see an example eventually these models become intelligent over time and it really starts with this you know the neural network at its end makes a probability claim it says the probability that this is a zero is something like 0.9 and you say um but you know it's actually a one and so we're going to give you some loss uh and and then it says okay how could I have to update myself and it says well that was my probability that's my claim I can understand these from my probability basis and then I can ask how could I change so that I could have been better how could what is my change in weights that would improve or minimize my loss as much as possible and like there you go you can just write it as a formula and some of you guys are looking like what you mean you can just

write out the formula that looks incredibly scary here's the beautiful thing about cs109 this looks scary right now this is something every single person in this class is going to master and feel very comfortable with and you will understand that mathematics that is the basis of this huge revolution in Ai and it's not just the basis of this revolution AI is math that will continue to change the world it is math absolutely worth knowing you will walk out of the class knowing what all of this means of course we're not there yet you're not supposed to look at that and be like yeah obviously it's the derivative of loss with respect to each of the weights um that's where we're going to get to in cs109 we're going to get there and not only are you going to be able to derive these we're going to derive all this work and then we're going to use it to start to solve some problems uh we're going to solve some interesting problems like detecting heart disease figuring

out what movies people like um and doing some DNA analysis and you know I've told this story through Chihuahuas and muffins but one of the interesting things happening AI right now is we have these tools when you learn how to use these and you learn how to use them appropriately then the next question is what problems do you want to solve and we all have different answers for that but I would love to see these tools in your hands because I bet you guys would think of the coolest most useful things to do with uh with this like for example instead of detecting Chihuahuas versus muffins one of the things that somebody here at Stanford figured out was can we take a photo of somebody's skin and detect is this cancer or not cancer and there's a lot of interesting things to say about this but one of the things I'd like to point out is this is somebody who was just a few years older than most of you guys in this class and this was only a few years ago somebody

at Stanford took some of these models that we're going to learn about and did something really worthwhile okay so what's the story so far hey guys going through a huge change and so far in its history not once but twice AI was Revolution advised people who understood their probability Theory really well end of story accept it no sorry too much suspense except it obviously isn't the end of the story it just keeps changing uh and there's not the end of the story for a bunch of reasons we're going to learn core probability theory in cs109 it'll be driven by application it'll be driven by our desire to understand this world but you're going to learn this fundamental theory that explains a lot of natural phenomena and it's gonna be much more useful than just learning there is abundance of important problems and I'm going to just show you one open problem that computers are really not that good at so this is a problem of One-Shot learning I'm going to show you an

example of a single symbol and can you recognize which of these is an example another instance of that symbol so that's your single training and I want you to figure out which of these is another example is this it is this it is this it is this it ah fantastic you guys are this part you just you just that it's amazing humans are brilliant in that way but typical machine learning often needs to see millions and millions of examples and this is an example of you know we really have a lot left to do in the world of AI if you learn your probability it's not just good for machine learning if you're really into algorithms you just want to go into 161 you want to understand how all these different algorithms that have allowed us to use computers in such effective ways work you want to understand your probability so many modern algorithms use probabilistic analysis for telling the story of how they work so well and they use probabilistic analysis for great ideas

and how to make cool ideas much faster we've all lived outside of the university and had experiences where probability could help us make good decisions there is this other part to cs19 I'll teach you fundamental probability and there's going to be times in your life when you will really appreciate that when somebody gives you a probabilistic claim that you can understand what that means if somebody gives you a probabilistic claim and you get more information you can understand how to incorporate that more information to improve your probabilistic understanding and it just makes us better understand the world around us and if you understand the world around us you can start to build things for that world a couple other cool examples you know some things aren't traditional AI with deep learning but maybe you want to be using some interesting conditional probability like recommender systems are some examples of that uh what a time my god with so much

moving we need people to be building useful and important things with technology but we also need people who understand it very well to figure out how it could be used wrong and to be able to figure out when other people are doing things that we don't like uh ethics has become more and more important and it's not just ethics it's the codification of Ethics into things like law there's huge fields and careers to be made if you care about intersections Beyond just you know making the next cool Dolly image generator but are cool too maybe you want to understand how it made this picture of this giraffe and this uh bunny on this airplane sorry this is the image of image generation from like two years ago and this is where it is now it's changed a lot I had to update my slides okay but you know there's a few stories I hope you guys are just excited to learn this for the the pure joy of understanding how the world works the pure joy of learning tools that will

allow you to build things that other people can't build but you know there is this practical side too it turns out this is the concept that is one at most demand in industry and also in Academia they did this survey for PhD students coming in they said what do you wish you knew better upon graduation and and the most common answer was a better understanding of probability it's a cool thing to learn it's going to enrich us as people we'll walk out just being a little bit more enlightened into the complexity of this world and we'll be able to do some cool stuff speaking of cool stuff here's just one story to tell you about how we try and incorporate the real world into cs109 ah spring 2017 what innocent days anyways spring 17 people in cs109 came in for their final and there was this problem and the problem says hey you've been learning a lot of probability Theory let's use it to make a really smart eye exam have you guys ever been to the eye doctor and

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent