[User] Please transcribe this text

[Assistant] Uh, the Poincare, no, actually the Riemann hypothesis a couple years ago, somebody credible claimed to have proved it. Proof turned out not to be right. Then there's the Poincare conjecture.


[User] Please transcribe this text

[Assistant] Now this one was finished off. It was proved to be true in 2003 by a Russian named Grigor Perelman.


[User] Please transcribe this text

[Assistant] The conjecture says, roughly speaking, that 3D objects without holes, like not a donut,


[User] Please transcribe this text

[Assistant] Uh, are equivalent to the sphere. They can sort of be deformed into a sphere.


[User] Please transcribe this text

[Assistant] This is known to be true in four dimensions and higher, but nobody could prove it for three dimensions until Perelman came along.


[User] Please transcribe this text

[Assistant] Now there's a bit of a controversy around this guy. Uh, he had an 80 page proof but didn't have all the details. So then other teams of mathematicians got together and


[User] Please transcribe this text

[Assistant] Wrote 350 pages of details, uh, and then most people believe now that it's right, and that his original proof might not have had all the details, but he had the right structure of the proof.


[User] Please transcribe this text

[Assistant] So, uh, he won prizes for this. You know, he won the highest prize in mathematics, the Fields Medal. And, uh, just earlier this year, he was awarded the one million dollar millennium prize.


[User] Please transcribe this text

[Assistant] And there's about six problems or so that if you solve one of them, the Clay Institute gives you a million dollars. And he's the first one to win the million dollars. Now the guy's a little strange.


[User] Please transcribe this text

[Assistant] He rejected the Fields Medal and refused to go to the ceremony where he was being honored and he's recently rejected the Millennium Prize.


[User] Please transcribe this text

[Assistant] Anyway, this area is murky and we have an expert to explain it all for us on video, which I thought I'd show.


[User] Please transcribe this text

[Assistant] Alright, let's do, uh, a simpler one here.


[User] Please transcribe this text

[Assistant] implies n squared greater than or equal to four. Now z we use for the integers.


[User] Please transcribe this text

[Assistant] And so that would be 0, 1, minus 1, 2, minus 2, and so forth. And this symbol here is, implies.


[User] Please transcribe this text

[Assistant] Alright, in fact, one thing you're gonna notice when you read the text is we use different notation there as the standard than I will use in lecture. And there's lots of ways of doing it. You could have a double arrow, a single arrow. You could write out implies every time as it's done in the text. And it doesn't really matter which one you wanna use. Alright, as long as you use one of the conventions for implies. And let me define what implies means.


[User] Please transcribe this text

[Assistant] As follows, you have the values of p and q, and I'll give the value of p implies q.


[User] Please transcribe this text

[Assistant] P is Q and Q is true. Sorry, P is true and Q is true. What about P implies Q?


[User] Please transcribe this text

[Assistant] Even though this is false, as long as p is false, p implies q is true. Alright, so this is important to remember. False implies anything is true. Which is a little strange. There's a famous expression. Uh, if pigs could fly, I would be king.


[User] Please transcribe this text

[Assistant] Because pigs don't fly. Doesn't matter whether or not I'm king, which I'm not. Since pigs don't fly, even though that's false, the implication is true.


[User] Please transcribe this text

[Assistant] Now some of you have worked on these things before, it's second nature. If you haven't, I want to start getting familiar with that. Uh, alright, let's do another example.


[User] Please transcribe this text

[Assistant] Alright, what about this proposition? For all n, for all integers, n and z, n greater than or equal to 2,


[User] Please transcribe this text

[Assistant] N squared greater than or equal to four. Is that true?


[User] Please transcribe this text

[Assistant] Is n bigger than 2 if and only if n squared is bigger than 4? False. What's an example of n for which that's false? Negative. Alright, so it's false. N equals negative 3.


[User] Please transcribe this text

[Assistant] Negative three squared is bigger than equal to four, but negative three is not bigger than equal to two. And in fact, this if and only if means you have to have an implication both ways.


[User] Please transcribe this text

[Assistant] So you gotta check both ways for it. So let's do the truth table. Extend this truth table out here.


[User] Please transcribe this text

[Assistant] We'll do the truth table for p, uh, if and only if q.


[User] Please transcribe this text

[Assistant] True does not imply false, that's false. And false implies false. And so now we can see where p is if and only if q. If they're both true, then it's true here.


[User] Please transcribe this text

[Assistant] What about here? Is P true if and only if Q is true in this case?


[User] Please transcribe this text

[Assistant] No, because p implies q is false, but q implies p is true. So it's false. False here.


[User] Please transcribe this text

[Assistant] Uh, I made a mistake there, right? That was true. Whoops. Yep. Uh, and true, we can only have true. Okay, they're both true, so we're okay.


[User] Please transcribe this text

[Assistant] So P if and only if Q is true when they're both true or both false. And that's it. If they're different, then it's not true.


[User] Please transcribe this text

[Assistant] The key here is to always check both ways.


[User] Please transcribe this text

[Assistant] So if you're asked to prove an if and only if, you gotta prove that way and that way.


[User] Please transcribe this text

[Assistant] Alright, we've just done about 15 propositions. Is every sentence a proposition?


[User] Please transcribe this text

[Assistant] Yes? No? No. What's an example of something that's not a proposition?


[User] Please transcribe this text

[Assistant] Because if it were true, it wouldn't be false, and if it was false, then it would be true and you'd have a contradiction.


[User] Please transcribe this text

[Assistant] So it's neither true nor false. What's a more simple example of something that's not a proposition?


[User] Please transcribe this text

[Assistant] Boy, I would have said that's true in some, some world. You know, cause that, yeaah, that's a tissue. So it's a true statement. Uhm. Hello. That's good. That's either true nor false. Yeaah. A question. Who are you?


[User] Please transcribe this text

[Assistant] Neither true nor false. So not everything is a proposition, but this course, pretty much everything we deal with will be a proposition.


[User] Please transcribe this text

[Assistant] Alright, so that's it for propositions. Any questions on propositions?


[User] Please transcribe this text

[Assistant] Alright, next we're going to talk about axioms.


[User] Please transcribe this text

[Assistant] The only difference is that axioms are propositions that we just assume are true.


[User] Please transcribe this text

[Assistant] There's no proof that an axiom is true. You just assume it because you think it's reasonable. In fact, the word axiom comes from Greek. It doesn't mean to be true. It means to think worthy. Something you think is worthy enough to be assumed to be true.


[User] Please transcribe this text

[Assistant] Now, a lot of times you'll hear people say, sometimes we'll even say it to you, you know, don't make assumptions when you're doing math. No, that's not true.


[User] Please transcribe this text

[Assistant] You have to make assumptions when you do math, otherwise you can't do anything. Cause you gotta start with some axioms.


[User] Please transcribe this text

[Assistant] The key in math is to identify what your assumptions are so people can see them. And the idea is that when you do a proof, anybody who agrees with your assumptions or your axioms can follow your proof and they have to agree with your conclusion.


[User] Please transcribe this text

[Assistant] Now they might disagree with your axioms, in which case they're not gonna buy your proof.


[User] Please transcribe this text

[Assistant] Now there are lots of axioms used in math.


[User] Please transcribe this text

[Assistant] If A equals B and B equals C, then A equals C. There is no proof of that. But it seems pretty good. And so we just throw it in the bucket of axioms and use it.


[User] Please transcribe this text

[Assistant] Axioms can be contradictory in different contexts. Here's a good example in Euclidean geometry.


[User] Please transcribe this text

[Assistant] You all saw this in geometry, in middle school, right?


[User] Please transcribe this text

[Assistant] That contradicts this. It says, given a line L and a point P not on L, there is no line through P parallel to L on the sphere. There's a field called hyperbolic geometry.


[User] Please transcribe this text

[Assistant] And there, there's an action that says, given a line L and a point P not on L, there are infinitely many.


[User] Please transcribe this text

[Assistant] How can this be? Does that mean one of these fields is totally bogus, or two of them are? Because they've got contradictory axioms. That's okay. Just whatever field you're in, state your axioms, and they do make sense in their various fields.


[User] Please transcribe this text

[Assistant] You know, this is planar geometry, this is on the sphere, and this is on, you know, hyperbolic geometry. They make sense in those contexts. So, you can have more or less whatever, whatever axioms you want. There are sort of two guiding principles to axioms.


[User] Please transcribe this text

[Assistant] And you can see why that's important. You know, if you spend three weeks proving something's true,


[User] Please transcribe this text

[Assistant] And the next day somebody proves it's also false. I mean the whole thing was pointless.


[User] Please transcribe this text

[Assistant] So it only makes sense if your axioms as a group are consistent. A set of axioms is said to be complete.


[User] Please transcribe this text

[Assistant] To prove every proposition is either true or false.


[User] Please transcribe this text

[Assistant] Alright, now this is desirable because it means, well, you can solve every problem. Alright, everything is, you can prove it's true or you can prove it's false. You can get to the, to the end.


[User] Please transcribe this text

[Assistant] You'd think it shouldn't be too hard to get a set of axioms that satisfies these two basic properties. You're allowed to choose whatever you want, really.


[User] Please transcribe this text

[Assistant] Just you don't want to be creating contradictions, and you want a set that's powerful enough that allows you to prove everything is true or false, one of the two. It turned out not to be so easy to do this. And in fact, many logicians spent their careers


[User] Please transcribe this text

[Assistant] Famous logicians trying to find a set of axioms. Just one set. It was consistent and complete.


[User] Please transcribe this text

[Assistant] In fact, Russell and Whitehead are probably the two most famous. They spent their entire careers doing this and they, they never got there. Then one day this guy named Kurt Gödel showed up. And in the 1930s, he proved it's not possible that there exists any set of axioms that are both consistent and complete. Now this discovery devastated the field. It was a huge discovery. You know, imagine poor Russell and Whitehead.


[User] Please transcribe this text

[Assistant] They spent their entire careers going after this holy grail, then Kurt shows up and says, hey guys, there's no grail. Doesn't exist.


[User] Please transcribe this text

[Assistant] That's a little, little depressing. Pretty bad day when that happened.


[User] Please transcribe this text

[Assistant] Now, it's an amazing result because it says if you want consistency, and that's a must,


[User] Please transcribe this text

[Assistant] There will be true facts that you will never be able to prove.


[User] Please transcribe this text

[Assistant] We're not gonna prove that here, it's proved in a logic course. For example, maybe Goldbach's conjecture is true, and it is impossible to prove.


[User] Please transcribe this text

[Assistant] Now, we're gonna try not to assign any of those problems for homework.


[User] Please transcribe this text

[Assistant] Uhm, and in fact people, they do exist. You can, it's complicated. You can state a problem that you can't prove is true or false.


[User] Please transcribe this text

[Assistant] Uh, and you may be thinking that from time to time. Hey, it's one of those, you know.


[User] Please transcribe this text

[Assistant] It's, remember what your parents told you? If you work hard enough, you can do anything. They were wrong. Alright, that's enough for now. We'll do more of this next time.


[User] Please transcribe this text

[Assistant] Chip was the life of Sector 6F at the nuclear plant, but Chip once confessed to me, he did have a few regrets. But Chip once confessed to me, he did have a few regrets.


[User] Please transcribe this text

[Assistant] Regrets, eh? This local news man's had a few. Covering a town of backwater rubes who for some reason hate my guts. This is Kent Brockman.


[User] Please transcribe this text

[Assistant] Live at the Springfield Peach Parade. Sir, could you give us eight seconds of your homespun wisdom? It's a little known fact that you can get headlines from peaches. Uh, this is my daughter Peaches.


[User] Please transcribe this text

[Assistant] We'll have more regrets at 11 tonight following an all new bottle of scotch.


[User] Please transcribe this text

[Assistant] Now let us text on our ubiquitous Apple tablets and phones.


[User] Please transcribe this text

[Assistant] So is there truly anyone among us without regrets?


[User] Please transcribe this text

[Assistant] I'm Bart Simpson. Who the hell are you? Agent Crawford, FBI. You guys know I don't talk to field agents. Get your boss on the phone. I'm not here for you. I'm here for your dad.


[User] Please transcribe this text

[Assistant] Oh Monty, I can't believe you found me after all these years. I've saved myself for you.


[User] Please transcribe this text

[Assistant] I wanna talk about submarines and trips. Simpson has to go.


[User] Please transcribe this text

[Assistant] I'm glad I'm not going through this alone. I haven't seen my boyfriend in months.


[User] Please transcribe this text

[Assistant] Well, it was nice to share this moment with someone who cared.


[User] Please transcribe this text

[Assistant] Hey, could you babysit for an hour? I've been alone with the baby for days.


[User] Please transcribe this text

[Assistant] The Fox Network forbids the broadcast of step-by-step instructions for illegally downloading copyrighted intellectual property. In the meantime, please enjoy this footage from NASCAR's 2011 Martinsville Cup.


[User] Please transcribe this text

[Assistant] Hi. So you're Sherlock Holmes. Molly's told me all about you. You're on one of your cases.


[User] Please transcribe this text

[Assistant] Well, I'd better be off. I'll see you at the Fox. At Sixish? Yes! Bye. Bye. It was nice to meet you.


[User] Please transcribe this text

[Assistant] I've given you a glimpse, Sherlock, just a teensy glimpse of what I've got going on out there in the big bad world. I'm a specialist, you see. Like you.


[User] Please transcribe this text

[Assistant] This little game of ours, playing gym from IT. Playing gay. Did you like the little touch with the underwear?


[User] Please transcribe this text

[Assistant] Westwood. Do you know what happens if you don't leave me alone? You're a lot... to you.


[User] Please transcribe this text

[Assistant] No, don't be obvious. I mean, I'm gonna kill you anyway someday. I don't wanna rush it though. I'm saving it up for something special. No, no, no, no, no. I mean, don't stop prying.


[User] Please transcribe this text

[Assistant] Well, I'd better be off. Well, it's so nice to have had a proper chat. What if I was to shoot you now? Right now? Then you could cherish the look of surprise on my face.


[User] Please transcribe this text

[Assistant] Cause I'd be surprised, Sherlock, really I would. I'm just a teensy bit... disappointed.


[User] Please transcribe this text

[Assistant] And of course you wouldn't be able to cherish it for very long. Ciao. Sherlock Holmes.


[User] Please transcribe this text

[Assistant] I think I'm gonna throw up the mac and cheese you fed me. I'm not supposed to have it. That's why I had so much.


[User] Please transcribe this text

[Assistant] I was flying from DC to New York and of course I had to lay over in Springfield. How's the gang at Channel 6?


[User] Please transcribe this text

[Assistant] Kent, I'm gonna tell you the most important mistake you ever made after this break.


[User] Please transcribe this text

[Assistant] You coulda come with me, but you were suckling the dual teats of infotainment and celebra-fawning.


[User] Please transcribe this text

[Assistant] Kent, I think I found my ticket out of this town. Or at least to a better Springfield.


[User] Please transcribe this text

[Assistant] Local news is a joke. I'm going to cable.


[User] Please transcribe this text

[Assistant] We'll see about that. Yes, we shall see. About that, things will be seen. By us.


[User] Please transcribe this text

[Assistant] You'll regret this, Kent, when I have my own show and you're stuck here tracking Santa's flight from the North Pole. Oh look, he's over Greenland!


[User] Please transcribe this text

[Assistant] I don't know what it is about having all my dreams fulfilled but I feel great!


[User] Please transcribe this text

[Assistant] Except you don't collect human bones. Yes, yes, of course I don't.


[User] Please transcribe this text

[Assistant] So that's it. All my dreams lived.


[User] Please transcribe this text

[Assistant] All but one. But we've gotta do it! I never leave a job unfinished. It's as true now as that week I worked on the high school yearbook. So much infighting, I had to get outta there. Alright.


[User] Please transcribe this text

[Assistant] So don't do what I did. That concludes our safety video.


[User] Please transcribe this text

[Assistant] Uh, actually my hero was the actress who provided Rocky's voice. June Foray, a true legend in the voiceover community. I'm just gonna stay on the plane and think about her influence. She has lived her life.


[User] Please transcribe this text

[Assistant] Oh, he probably sees a mouse he wants to tear in half.


[User] Please transcribe this text

[Assistant] No matter what, Homer Simpson has done it. And soon I hope I remember who Homer Simpson is and his relationship to me.


[User] Please transcribe this text

[Assistant] Oh, yeaah, great, uhhm.


[User] Please transcribe this text

[Assistant] Do I drop you at the curb or do I have to park and walk you in?


[User] Please transcribe this text

[Assistant] I am too. How do you do?


[User] Please transcribe this text

[Assistant] One, two. Two dancing shoes. One, two. One, two. Oops. Two.


[User] Please transcribe this text

[Assistant] And stop thinking about the Russians! Men, we just need to disappear as far as they're concerned. Disappear! Okay!


[User] Please transcribe this text

[Assistant] I'm going to clean up. I have a nasty feeling I had a bit of an accident back there. And Nico. What? Thanks.


[User] Please transcribe this text

[Assistant] Sometimes you just gotta let the hate go. You're really going to feel better once Florian is dead? Soon, we will find out.


[User] Please transcribe this text

[Assistant] There he is. Let's go talk to him. He's always at the games being held around Algonquin. Not too good either. I don't think I've seen him win a hand.


[User] Please transcribe this text

[Assistant] Hey! I hear you know Florian Krevich. Where is he?


[User] Please transcribe this text

[Assistant] Thanks, Mom. I'll start by taking my plate to the dishwasher. Wherever that is.


[User] Please transcribe this text

[Assistant] What the? That's not where I buried them. Come on!


[User] Please transcribe this text

[Assistant] Firm but fair, sir. Don't want any troublemakers on our submarine.


[User] Please transcribe this text

[Assistant] God yeaah. Mad about it. So what he ever did in his spare time. He's a nice guy, Alex. I liked him.


[User] Please transcribe this text

[Assistant] He was, er, never much of a one for hoovering.


[User] Please transcribe this text

[Assistant] Last night, there was nothing taken. Oh, there was a message left for Alex on the landline.


[User] Please transcribe this text

[Assistant] Goodbye Homer Junior. I guess you're the man of the house now. And never forget, even though the mortgage is due on the first, even though the


[User] Please transcribe this text

[Assistant] Fasten the mortgage front. Fasten the mortgage front. Fasten the mortgage front.


[User] Please transcribe this text

[Assistant] Oh, I'm exhausted from head, shoulders, knees and toes, knees and toes. It's the toes that get you, Marge. It's the toes.


[User] Please transcribe this text

[Assistant] Way ahead of you, Marge. I'm taking all four of my kids to the zoo tomorrow. Three? Yes, we'll be back by three. Homer has a very tight nap schedule.


[User] Please transcribe this text

[Assistant] Okay, I know it'll cheer you kids up, seeing me out monkey to monkey.


[User] Please transcribe this text

[Assistant] Okay, I got in part all my fatherly advice in this one walk. The sky is blue, but nobody really knows why. Don't believe what they tell ya. Girls are great and terrible at the same time. Get used to it. And most importantly, oops, we're here, you'll have to figure it out on your own. You'll have to figure it out on your own.


[User] Please transcribe this text

[Assistant] Sorry little fella. One day I'll be that guy who comes to your wedding, makes you feel a little weird, and then runs away.


[User] Please transcribe this text

[Assistant] Hi Maggie. If you could talk, I know you'd have a few choice words for me. You want me to take care of your dolly?


[User] Please transcribe this text

[Assistant] Why are you telling me this now? Do you always get sentimental after you kill people? You kept asking.


[User] Please transcribe this text

[Assistant] Wonderful. You're here on some revenge mission for something that happened ten years ago, and you don't care whose life you ruin in a way. No.


[User] Please transcribe this text

[Assistant] Right now I don't think you're going to find out. Let's hide the body at least for a while.


[User] Please transcribe this text

[Assistant] We'll just get there. Damn these people.


[User] Please transcribe this text

[Assistant] Brucey! Have you met my cousin, Nico? This is Brucey. We met online. Oh, loveme.net?


[User] Please transcribe this text

[Assistant] We gotta get you online. It's a world of opportunities. Such as?


[User] Please transcribe this text

[Assistant] Go to Twat, and register on one of the PCs there. A pretty girl is expecting you. I'm bored of not being able to email your cousin, and the family keeps sending me news for you.


[User] Please transcribe this text

[Assistant] Listen, me and Nico are in a bit of trouble. Uhm, need to get out a broker, a few days.


[User] Please transcribe this text

[Assistant] I do not think it will be much difference to them, Nico. One dead bellic will give them a little bit of happiness while they wait for next. I do not care though.


[User] Please transcribe this text

[Assistant] Here we are, the beginning of our new lives. Again.


[User] Please transcribe this text

[Assistant] I mean, I don't think we'll be impressing women with our wonderful hot tub, but, uh, this looks okay! Yes! Great!


[User] Please transcribe this text

[Assistant] So, I guess we start again.


[User] Please transcribe this text

[Assistant] Our human universals, what everybody shares. So we've been talking about language, about rationality, about perception, about the emotions, about universals of development, and we've been talking about what people share. But honestly, what a lot of us are very interested in is why we're different.


[User] Please transcribe this text

[Assistant] And uhm, this is the class which is gonna bother the most people. It's not dualism.


[User] Please transcribe this text

[Assistant] It's not evolution. It's this. Because the scientific findings on human psychological differences are to many of us shocking and unbelievable.


[User] Please transcribe this text

[Assistant] And I will just try to persuade you to take them seriously. Okay, so how are people?


[User] Please transcribe this text

[Assistant] Different. Well, there's all sorts of ways. Uhm, your sexual identity. It is at the core of your being.


[User] Please transcribe this text

[Assistant] For almost all of us, whether you're male or female, how we refer to you in language, what pronoun we use is indexed on how we, on your


[User] Please transcribe this text

[Assistant] Desires is such a good question that we're going to talk about it after spring break.


[User] Please transcribe this text

[Assistant] This is also such a good topic, it's gonna get its own class. The very last class of the semester is devoted to happiness.


[User] Please transcribe this text

[Assistant] And the question of what makes people happy, uhm, what makes people unhappy, and what makes people differ in their happiness. If I ask you to rank how happy you are from a scale of one to ten,


[User] Please transcribe this text

[Assistant] The numbers would differ across this room, and there's different theories as to why. Uhm,


[User] Please transcribe this text

[Assistant] Your success and failure in life. This is somewhat interesting because you could study this in more or less objective ways. We don't have to ask people. We could look at your relationships. How they begin, how they end. Your job satisfaction. We could look at your criminal records. Some of you are going to see time. Most will not.


[User] Please transcribe this text

[Assistant] Uhm, some of you will get into little troubles all through your life. Some of you already have seen the inside of a police station, possibly a lineup. Uhm, others couldn't go near such a thing. What, what determines that? And at the root of all human differences,


[User] Please transcribe this text

[Assistant] Are two main factors. And so I want to talk about the two main interesting factors. Uhm, one is personality.


[User] Please transcribe this text

[Assistant] The other is intelligence. And this is what, these are the differences I'll talk about today, first from the standpoint of how do we characterize them, how do we explain them, and then from the standpoint of why these differences exist in the first place.


[User] Please transcribe this text

[Assistant] One way to characterize personality is in terms of people's style with dealing with, in dealing with the world and particularly their style with dealing, in dealing with other people.


[User] Please transcribe this text

[Assistant] So you take a simple character you know of, uhm, and you could talk about that person's personality, talk about in terms of being impulsive, irresponsible.


[User] Please transcribe this text

[Assistant] Sometimes lazy. Good hearted.


[User] Please transcribe this text

[Assistant] You could compare that person's personality with other people's personality. Such as my colleague who gave a talk last class. He's wonderful. He's responsible and reliable and very kind. Uhm, and different from Homer. And so this difference is a difference in personality.


[User] Please transcribe this text

[Assistant] Now, when we talk about personality, we're talking about something else as well. We're talking about a stable trait across situations and time.


[User] Please transcribe this text

[Assistant] So, if all of a sudden the person next to you kind of smacks you in the head, you might be angry. But we wouldn't call that personality.


[User] Please transcribe this text

[Assistant] It's personality if you walk around all the time, angry. It'd be a stable trait. It'd be something you carry around with you. Uhm, and that's what we mean by personality. Now,


[User] Please transcribe this text

[Assistant] And one crude way to think about reliability is a test is reliable


[User] Please transcribe this text

[Assistant] My bathroom scale is reliable if whenever I stand on it, it gives me more or less the same number. It's not reliable if it's off by ten pounds in the course of a day.


[User] Please transcribe this text

[Assistant] Uhm, similarly, if I give you a personality test now, and it says that you're anxious and defensive,


[User] Please transcribe this text

[Assistant] Well, and then give it to you tomorrow and it says you're calm and open-minded.


[User] Please transcribe this text

[Assistant] It's not a reliable test. So reliable is something you can trust over time.


[User] Please transcribe this text

[Assistant] Validity is something different. Validity is, uhm,


[User] Please transcribe this text

[Assistant] So validity means it's sort of a good test. Forget about how reliable it is. Does it tap what you're interested in? So for example, suppose I determine your intelligence by the date of your birth.


[User] Please transcribe this text

[Assistant] I figure out what day you're born and I have a theory that from that predicts how smart you are. That's my intelligence test, the date of your birth. Maybe uhm, people born in January are the dumbest, people born in December are the smartest. Is that? I was born on Christmas Eve. Uhm, is that?


[User] Please transcribe this text

[Assistant] Is that a reliable test? Yes! It's a wonderfully reliable test. I'll test you today, I'll test you tomorrow, I'll test you next year, I'll test you the day you die, I'll get the same IQ score.


[User] Please transcribe this text

[Assistant] There are no shortage of personality tests. You can get them all over the place.


[User] Please transcribe this text

[Assistant] Uhm, including on the web. So I took one recently. I took, I took, uh, which superhero are you?


[User] Please transcribe this text

[Assistant] This is in black and white form a version of the Rorschach test. The Rorschach inkblot test. How many people have heard of the Rorschach test?


[User] Please transcribe this text

[Assistant] Okay, is there anybody here who's actually, in any sort of situation, taken a Rorschach test?


[User] Please transcribe this text

[Assistant] For people who want to join the seminary. It was invented by a guy named Herman Rorschach. He devoted his entire life to the inkblot test. His nickname when he was a teenager, I am not kidding you, was inkblot.


[User] Please transcribe this text

[Assistant] A man in a ski mask. Well, it turns out that there are right answers and wrong answers to the Rorschach test.


[User] Please transcribe this text

[Assistant] According to the test, and this is from a real Rorschach test, it is important to see the blot as two human figures, usually females or clowns. Good work over there.


[User] Please transcribe this text

[Assistant] It, it has been, it has been studied and explored and it is as useless as, as throwing dice. It is as useless as tea leaves. Uhm, nonetheless, people love it and it's used all over the place. Uhm, it is used for example in child custody cases.


[User] Please transcribe this text

[Assistant] If uhm, if you have broken up with your partner and you guys are quarreling over who gets to keep the kids, uh, you might find yourself in a shrink's office looking at this. And in fact, this is why they end up on the web. Uhm, there are services, there are people that have been kind enough to put on the web these ink blots, including the right answers to them. But they are worthless as psychological measures.


[User] Please transcribe this text

[Assistant] Did a study where he went through the dictionary and took all of the traits that he believed to be related to personality. Uhm, and he got 18,000 of them.


[User] Please transcribe this text

[Assistant] But what was interesting was they weren't necessarily independent traits. So the traits like friendly, sociable, welcoming, warm-hearted,


[User] Please transcribe this text

[Assistant] Seem to all tap the same thing. So Cattell and many others tried to narrow it down. Tried to ask the question, in how many ways are people's personalities different from one another?


[User] Please transcribe this text

[Assistant] How many parameters of difference do you need? How, how many numbers?


[User] Please transcribe this text

[Assistant] And since there's basically two types of traits with two settings for each, there are basically four types of people. Later on he added another trait, uh, which he described as psychoticism versus non-psychoticism, but crudely meant, uhm, whether you're aggressive or empathetic.


[User] Please transcribe this text

[Assistant] And then you have three traits with two settings each giving you eight types of people.


[User] Please transcribe this text

[Assistant] Along these 16 dimensions, you should be able to do so.


[User] Please transcribe this text

[Assistant] And the big five personality factors, uhm, are these. And what this means is when we talk about each other,


[User] Please transcribe this text

[Assistant] And use adjectives. The claim is we could do so in thousands of different ways, but deep down we're talking about one of these five dimensions. This means that when a psychological test measures something about somebody,


[User] Please transcribe this text

[Assistant] Is somebody sort of nutty and, uh, and worrying or are they calm? Extrovert versus introvert.


[User] Please transcribe this text

[Assistant] Uhm, open to experience versus close to experience.


[User] Please transcribe this text

[Assistant] Well, why should we believe this? Why should we take this theory seriously? Well, there's actually some evidence for it. Uhm, it seems to have some reliability.


[User] Please transcribe this text

[Assistant] So, if you test people over years, if I test your personality now on the five traits, and test you five years from now, it will not have changed much. And once you pass the age of thirty, it's very stable indeed.


[User] Please transcribe this text

[Assistant] Uhm, if you think about your parents and then give mom and dad a mental test on where they stand on each of the five traits, ten years from now, mom and dad will still be there. Uhm, it also seems to get agreement across multiple observers. So, if I ask for each of the five traits, uhm,


[User] Please transcribe this text

[Assistant] You walk around and you leave and your personality leaves a trail in the minds of people around you. And this trail is characterized in terms of these five dimensions.


[User] Please transcribe this text

[Assistant] Uh, how openness, open you are on the psychological personality test relates to how likely you are to change your job.


[User] Please transcribe this text

[Assistant] Extroverts look people in the eye more and have more sexual partners. Cause they're extroverts. So these are real scales. Uhm, the Batman, Hulk, Wonder Woman doesn't correspond to anything in the real world. But where you stand in each of these five dimensions does seem to capture it.


[User] Please transcribe this text

[Assistant] Uhm, as an example of the agreement, by the way, somebody did a study of


[User] Please transcribe this text

[Assistant] Several of the characters on the television show, The Simpsons, because they wanted to find characters which everybody knew. And they had thirteen subjects judge, uh, these Simpsons characters on each of the five dimensions. Uhm, he uses openness, neuroticism, conscientiousness, and extraversion. Uhm, and he, they found considerable agreement.


[User] Please transcribe this text

[Assistant] Confusing, but those of you who have, can you guess which characters would be particularly agreeable? Anybody guess? Yea.


[User] Please transcribe this text

[Assistant] Flanders? Uhm, you are right. The most agreeable people are Flanders and Marge. Who would be not so agreeable?


[User] Please transcribe this text

[Assistant] You get strong consensus that Ned, Ned Flanders and Marge Simpson are highly agreeable people, 6.27 and 5.46, while Mr. Burns and Nelson are very low. Nelson's the little kid and when trouble happens he goes, ha ha. And that's, that's a psychological sign for low agreeability.


[User] Please transcribe this text

[Assistant] Okay, that's all I want to say at this point about personality and how we measure it. And again, we're going to get back to it later when we talk about differences in personality. Now I want to deal


[User] Please transcribe this text

[Assistant] What's the second big difference? The second big difference is intelligence.


[User] Please transcribe this text

[Assistant] So, just about everybody said intelligence involves abstract reasoning, problem solving, and the capacity to acquire knowledge. That's at the core of being smart.


[User] Please transcribe this text

[Assistant] Other people mention things like memory, mental speed, language, math, mental speed again, knowledge and creativity, also as hallmarks for intelligence. And again,


[User] Please transcribe this text

[Assistant] And so you have a range, and it's important to figure out how to characterize it. This is what research does. But there's a gut feeling that there's some people who are smart, and other people who are very smart, and some people who are dumb, and others who are very dumb. What you want to do from a scientific standpoint


[User] Please transcribe this text

[Assistant] Is characterize this in a more robust and interesting fashion.


[User] Please transcribe this text

[Assistant] And the textbook has a nice review of the history of attempts to define and measure intelligence. But there's just a couple of ideas I want to focus on.


[User] Please transcribe this text

[Assistant] One is an idea developed by a spearman.


[User] Please transcribe this text

[Assistant] S is your ability on specific tests.


[User] Please transcribe this text

[Assistant] So if there's ten tests that you're given as part of an IQ, an IQ test, ten subtests,


[User] Please transcribe this text

[Assistant] You'll get a different score in each of the subtests. There'll be a math test and a reading test and a spatial test, and you'll get different scores. G.


[User] Please transcribe this text

[Assistant] refers to a general intelligence and the general intelligence is something you bring to each of the tests in common. So this is diagrammed here.


[User] Please transcribe this text

[Assistant] Now, G is a very important notion. The term G is used by psychologists a lot, even in casual conversation. You know, people say, so what do you think of him? And he has high G. And what you mean is, he's a smart guy.


[User] Please transcribe this text

[Assistant] Why do you need G? Well, you wouldn't need G if your performance on each of these tests had nothing to do with each other. If the tests were genuinely separate, there'd be no general intelligence.


[User] Please transcribe this text

[Assistant] I'm running a gym, and we, we have all of these different athletic tests. So we have a running test, we have a basketball shooting test, a swimming test, fencing, list of ten of them.


[User] Please transcribe this text

[Assistant] Now each of you go through each of the tests, and then you'll each get ten scores.


[User] Please transcribe this text

[Assistant] But what we'll discover is that the scores are not independent of one another. People who are good at one athletic thing tend to be good at another.


[User] Please transcribe this text

[Assistant] Uhm, if there's somebody who's really good at running and swimming, odds are they're probably pretty good at climbing.


[User] Please transcribe this text

[Assistant] Uhm, and the same thing holds for IQ, which is above and beyond how good people are at specific things, there seems to be a factor as to how well they are in general. And this factor is known as G.


[User] Please transcribe this text

[Assistant] There's a, again, an extensive history of modern intelligence tests, uh, and what's really interesting is the tests now, what you need to know about the modern tests, the Westler tests for both adults and children, is how they're scored.


[User] Please transcribe this text

[Assistant] It's just automatic. Whatever the average is, is a hundred. It's as if I did the midterm, graded the midterm, computed the average, gave everybody who got the average a hundred, said your score is a hundred. It's just the average. It works on a normal curve.


[User] Please transcribe this text

[Assistant] And what this means is that it works so that the majority


[User] Please transcribe this text

[Assistant] Are say, above 145 IQ, which I imagine some people in the room are, uhm, you belong to .13% of the population. That's the way IQ tests work. Now, this is about IQ tests.


[User] Please transcribe this text

[Assistant] We can now ask about their reliability and their validity. What do they mean?


[User] Please transcribe this text

[Assistant] Well, this has turned out to be a matter of extreme debate. This just reiterates what I just said. Uhm, a lot of the debate was spawned by the book by Hearnstein and Murray called The Bell Curve.


[User] Please transcribe this text

[Assistant] And in the bell curve, these authors made the argument that IQ matters immensely for everyday life.


[User] Please transcribe this text

[Assistant] And as a result of this controversy, some interesting papers came out.


[User] Please transcribe this text

[Assistant] Does IQ matter? How does IQ relate to intelligence? How does, uhm, what's, what's the different, why are people different in intelligence? Why do different human groups differ in intelligence and so on?


[User] Please transcribe this text

[Assistant] Well, what did they conclude? The conclusions were slightly different, but here's the broad consensus by the experts.


[User] Please transcribe this text

[Assistant] Regarding the importance of IQ tests. And the claim is, IQ is strongly related, more so, probably more so than any other single measurable human trait, to many important educational, occupational, economic, and social outcomes. In some cases, the correlation is very strong.


[User] Please transcribe this text

[Assistant] Such as, uhm, success in school and success in military training. In other cases it's moderate but robust, such as social competence. And in other cases it's smaller but consistent law abidingness.


[User] Please transcribe this text

[Assistant] And they conclude whatever IQ test measure, it is of great practical and social importance. So IQ matters. Uhm, more particularly IQ matters for social achievement, for prestigious positions, and for on-the-job performance and other work-related variables. If I know your IQ score,


[User] Please transcribe this text

[Assistant] On the other hand, there's a lot of controversy about why this connection exists.


[User] Please transcribe this text

[Assistant] So to some extent, people have worried that the effectiveness of IQ is a self-fulfilling prophecy. And here is why.


[User] Please transcribe this text

[Assistant] But the reason for this in large extent is because to get to Yale, they give you an IQ test. The SAT.


[User] Please transcribe this text

[Assistant] So, same for graduate school. There's a GRE, which is yet another IQ test.


[User] Please transcribe this text

[Assistant] So to some extent it's a self-fulfilling prophecy. Uhm, I could make, society could choose to make how tall you are extremely important for educational success. They could say nobody under six feet tall gets into Yale.


[User] Please transcribe this text

[Assistant] And then some psych professor would stand up and say, of course, height is profoundly related to educational accomplishment. And it would be, because people made it so.


[User] Please transcribe this text

[Assistant] So, to some extent, a society that draws highly on IQ tests, uhm, regarding promotion and educational achievement and military status and so on, uhm,


[User] Please transcribe this text

[Assistant] So your score in IQ test, for instance, is to some extent related to how fast you could think and, uh, your memory abilities.


[User] Please transcribe this text

[Assistant] Now I want to shift to the second half of the class and talk about why. So we talked about two differences, one personality, one intelligence. I want to talk about why people differ. But before I do, uh, do people have any questions? Yes?


[User] Please transcribe this text

[Assistant] It's a good question. The question is, this young man took, uhm,


[User] Please transcribe this text

[Assistant] You're, you're, you're a clever man. Uhm, high G. Uhm, and you wanted to be in Slytherin. How do we know you didn't work the test? I mean, you know, you, you're gonna get these personality tests all the time. And, you know, personality tests, you're applying for a business and one of the tests is, I like to steal from my bosses.


[User] Please transcribe this text

[Assistant] I don't think so, no. That's a little IQ test right there. Uhm, so the question is how do you avoid that problem? Uhm, the test constructors have done so in certain clever ways. Uhm, for instance, there are often catch questions designed to catch a liar.


[User] Please transcribe this text

[Assistant] Uhm, some of these questions pose very unrealistic phenomena. So you might have a question in there saying, uhm, uh, I have never done anything I am ashamed of.


[User] Please transcribe this text

[Assistant] Now, some people will say, yes, that's true of me. But they tend to be liars. And so, unrealistic questions tend to catch liars. Also, you get the same question asked in different ways across the hundred items, and they could use the correlations to figure these things out.


[User] Please transcribe this text

[Assistant] I mean, again, the proof is sort of in the pudding. The reliability and validity of a test,


[User] Please transcribe this text

[Assistant] Wouldn't survive long as a personality test. So we know that, we know the test you got is a pretty good test because it seems to work for most people.


[User] Please transcribe this text

[Assistant] It's a good question. The question was about emotional IQ, which is something I'm actually going to touch upon a little bit later in the course. But people have talked about different forms of intelligence and emotional intelligence, uh, social intelligence.


[User] Please transcribe this text

[Assistant] Is, uhm, is arguably a candidate for success across different domains. The evidence for its predictive power


[User] Please transcribe this text

[Assistant] Is not as strong as for regular IQ tests.


[User] Please transcribe this text

[Assistant] So, you might be right, it might turn out to be a much better predictor. But one, it's not clear that we know that yet. Uhm, Peter Salovey has actually done some very interesting research on this, and is continuing work along those lines. The second thing is emotional intelligence is actually related to good old fashioned intelligence. They kind of pull together a lot, so it's not entirely separate.


[User] Please transcribe this text

[Assistant] But that's a good point and I'd like to return to it a little bit later on in the course. Yes?


[User] Please transcribe this text

[Assistant] Good question. How do you determine what a good test is? And again, it's a real art going through the details of how to do that, but the broad answers involve reliability and validity.


[User] Please transcribe this text

[Assistant] It's a good test if I test you today and I test you tomorrow I get the same score. It's a really good test if your score on that test predicts your grades.


[User] Please transcribe this text

[Assistant] So you have to see both the replicability of the test over time, but also its relationship to real world phenomena. And that's important. Again, why do we know the Batman Wonder Woman Hulk?


[User] Please transcribe this text

[Assistant] What, what I, what I, I, how I score in that test isn't gonna tell you anything about me. It's not gonna relate to my grades, it's not gonna relate to how well I'm liked.


[User] Please transcribe this text

[Assistant] How do we know that SAT is useful? Well, it actually corresponds with other things, like grades.


[User] Please transcribe this text

[Assistant] When I'm talking about personality, I'm defining it in terms of something which is stable over time. And your question, which is a good one, is, how do we know it's stable over time? Can't it change? And the answer is, yea, a lot of personality does change over time. A personality test you give to


[User] Please transcribe this text

[Assistant] Not perfectly. So you're right, you could change. You could become an introvert. You could become more of an extrovert. But where you stand now is significantly related to where you'll be in the future.


[User] Please transcribe this text

[Assistant] And that justifies talking about it as a stable trade. Same with IQ. Your IQ might change, it might go up, it might go down.


[User] Please transcribe this text

[Assistant] But it won't go up and go down that much and this is why it makes sense to talk about intelligence as a more or less stable trait. Okay, why are we different?


[User] Please transcribe this text

[Assistant] This doesn't say anything, this is just defining the question.


[User] Please transcribe this text

[Assistant] But I want to be clear. I am talking about the role of genes and also the role of environment in explaining human differences.


[User] Please transcribe this text

[Assistant] Not in explaining human characteristics.


[User] Please transcribe this text

[Assistant] So the distinction is we're interested in the amount of variation due to genetic differences, not the proportion of an individual's trait that's due to genes.


[User] Please transcribe this text

[Assistant] When we ask, what's the role of genes, what's the role of heredity in how tall people are?


[User] Please transcribe this text

[Assistant] The question is not asking for you. What is the role of your genes in determining how tall you are? It's not clear that's even a sensible question. The question is, there's a height difference between you and me and him and her. How do we explain that difference?


[User] Please transcribe this text

[Assistant] Meaning, uhm, the differences between people in the population and how tall they are is due in large part, not entirely, but in large part to their genes. What about the number of legs people have?


[User] Please transcribe this text

[Assistant] Well, the number of legs people have from zero, one or two is actually not very heritable at all.


[User] Please transcribe this text

[Assistant] Because almost everybody has two legs, and people who have fewer than two legs typically have lost one or both legs in an accident. It's not due to their genes.


[User] Please transcribe this text

[Assistant] So, of course whether or not you have legs is a very genetic matter, but the differences in number of legs is, is not usually genetic.


[User] Please transcribe this text

[Assistant] And so heredity is a claim about differences, not a claim about the origin of any specific trait.


[User] Please transcribe this text

[Assistant] Now we could talk about environment. And we could break up environment into two sorts of environment. One is shared environment. And shared environment is the extent to which the differences are caused by things, by phenomena that people raised in the same household share.


[User] Please transcribe this text

[Assistant] And suppose we want to say part of that's due to your environment. Well, suppose you're neurotic because you have lousy parents.


[User] Please transcribe this text

[Assistant] That would be part of your shared environment, because presumably siblings raised in the same household would have the same lousy parents.


[User] Please transcribe this text

[Assistant] This is contrasted with non-shared environment, which is everything else. Suppose I think you're neurotic because when you were five years old, somebody threw a snowball at you and it bounced off your head. That's non-shared environment. Suppose you're neurotic because you won the lottery when you were 21 and all the money messed you up. That'd be non-shared environment. So what you have here is heredity,


[User] Please transcribe this text

[Assistant] Shared environment and non-shared environment. And this equals one. That's everything.


[User] Please transcribe this text

[Assistant] Non-shared environment is a sort of garbage can category that includes everything that's not heredity and not shared environment. Suppose you think you're neurotic because aliens from the planet Pluto are zapping your brain. Suppose you're right.


[User] Please transcribe this text

[Assistant] Everything else is non-shared environment. It becomes interesting to ask...


[User] Please transcribe this text

[Assistant] Personality and intelligence, how do we parcel it out into what's genetic and what's environmental?


[User] Please transcribe this text

[Assistant] So, so, you and me will have different personalities. Why? Well, we were raised by different parents, and we have different genes. We can't tell. My, my brother


[User] Please transcribe this text

[Assistant] And me might share all sorts of things in common. But we had the same parents and the same genes. 50% of the same genes. So how do we tell what's causing us to be alike?


[User] Please transcribe this text

[Assistant] Some people are clones. Monozygotic twins are genetic duplicates. They share 100% of the same genes. That's kind of interesting. Dizygotic twins


[User] Please transcribe this text

[Assistant] Are not clones. They share 50-50. They're just like regular siblings.


[User] Please transcribe this text

[Assistant] That's zero percent above and beyond randomness.


[User] Please transcribe this text

[Assistant] Those three groups then become rather interesting. Uhm, particularly when we keep in mind that by definition two people raised in the same house by the same parents have a hundred percent the same shared environment.


[User] Please transcribe this text

[Assistant] So now we can start to answer these questions. Suppose you find that monozygotic twins are much more similar than dizygotic twins. Well, that would suggest that there's a large role of genes.


[User] Please transcribe this text

[Assistant] In those traits that you're interested in. It would not cinch the matter because there are other factors at work. For instance, monozygotic twins look more alike than dizygotic twins and maybe they have different and they have more similar environments because of this similarity in appearance.


[User] Please transcribe this text

[Assistant] And so it would suggest a low role of heredity.


[User] Please transcribe this text

[Assistant] Are, uhm, adopted children highly similar to their brothers and sisters.


[User] Please transcribe this text

[Assistant] If so, then there's a high role of shared environment. Suppose the Bloom children, uhm, and there's seven of them, all have an IQ of a hundred and four.


[User] Please transcribe this text

[Assistant] And we adopt three kids. And then, at the end of the day, those three kids each have an IQ of 104.


[User] Please transcribe this text

[Assistant] That would suggest that, and we do this over and over again across different families, that would suggest that there's something about the Bloom family being raised by me that gives you an IQ of a hundred and four.


[User] Please transcribe this text

[Assistant] To those of the biological Bloom children, it was suggested being raised by me has no effects really in your IQ. It's sort of separate.


[User] Please transcribe this text

[Assistant] A separate, a second, a final contrast, which is the thing that psychologists love.


[User] Please transcribe this text

[Assistant] One of the, one of the most surprising findings in behavioral genetics, uhm, the caption here is, separated at birth, the malefer twins meet accidentally, and they're at a patent office with the same device. Uhm, one of the hugely surprising findings from behavioral genetics is how alike identical twins reared apart are.


[User] Please transcribe this text

[Assistant] Uhm, there was one pair of twins studied by behavioral geneticists were known as the Giggle twins.


[User] Please transcribe this text

[Assistant] Because they were both, would always giggle. They burst into giggles at every moment. Uhm, even though it couldn't be environment because they weren't raised together. Uhm, more objectively, the brain scans of identical twins reared apart


[User] Please transcribe this text

[Assistant] Show that their brains are so similar, in many cases you can't tell whose brain is who.


[User] Please transcribe this text

[Assistant] I could tell your brain from my brain from a brain scan, and my brother's brain from my brain from a brain scan. But if I were to have an identical twin, it would be very difficult to tell whose brain is whose, even if we had no environment in common.


[User] Please transcribe this text

[Assistant] So this leads to two surprising findings of behavioral genetics. This is the first one. There's high heritability for almost everything.


[User] Please transcribe this text

[Assistant] Uhm, for intelligence, for personality, for how happy you are, for how religious you are, for your political orientation, for your sexual orientation, there is high heritability. There's a high effect of genes for just about everything.


[User] Please transcribe this text

[Assistant] That's actually not the controversial thing, I'm gonna tell you.


[User] Please transcribe this text

[Assistant] But before getting to the more controversial thing, uhm, I want to raise another issue which often gets discussed and has a good treatment in a textbook. Uhm, this suggests that individual differences within this, within a group, have genetic causes. Does that mean that group differences are largely the result of genetic causes?


[User] Please transcribe this text

[Assistant] Now, to some extent these groups are partially socially constructed.


[User] Please transcribe this text

[Assistant] Uhm, and what this means is that whether or not you fall into a group, uhm, is not entirely determined by your genetic makeup. It's often determined by social decisions.


[User] Please transcribe this text

[Assistant] So whether or not you count as a Jew, for instance, uhm, depends not entirely on genetic factors, but also on factors such as whether, uhm, your reform are orthodox, and whether you, so whether you would, uh, accept, uh, that a child of a Jewish man and a non-Jewish woman is Jewish.


[User] Please transcribe this text

[Assistant] There's plainly some genetic differences across human groups. And, uhm, say with regard to vulnerability to disease. Ashkenazi Jews, for instance, are vulnerable to Tay-Sachs. And the fact you could have this sort of genetic vulnerability suggests that there's some sort of reality to these groups. So you have to ask the question now, to what extent


[User] Please transcribe this text

[Assistant] Does the high heritability in individuals mean that there has to be a heritable explanation across groups? And the answer is not at all.


[User] Please transcribe this text

[Assistant] I'm not saying that this means that there's no genetic explanation for human group differences. All I'm saying is the question of the phenomena of within group genetic differences does not mean that there's a cross-group genetic, sorry, between group.


[User] Please transcribe this text

[Assistant] Genetic differences. Uhm, there's a nice example by Richard Lewinton, the geneticist, uhm, where he imagines two plots of uhm, what is it, some sort of wheat. Yea, two plots of land. And each one has a set of seeds.


[User] Please transcribe this text

[Assistant] And, oh no, they're over here. No. Anyway, one of them you fertilize a lot. The other one you fertilize a little. Now within each plot,


[User] Please transcribe this text

[Assistant] How much the seed grows is actually largely determined by the genetics of the seed.


[User] Please transcribe this text

[Assistant] And so you'd find high heritability for growth in the seeds. But the difference between groups...


[User] Please transcribe this text

[Assistant] I really hate all of you. And I like you. So I make up two midterms. You probably didn't notice, but there are two midterms. This midterm was fiercely hard. Savagely hard.


[User] Please transcribe this text

[Assistant] Because I like you, and I want you all to succeed. Now, so you have two different groups, you guys and you guys.


[User] Please transcribe this text

[Assistant] My point again is that there's a logical difference between a within group difference, within this half of the class, and a difference between groups, within, between this group and this group.


[User] Please transcribe this text

[Assistant] What do we know about, so that just shows they're not the same thing, but what's the fact of the matter? What do we know about human differences, uh, between different human groups?


[User] Please transcribe this text

[Assistant] Again, the textbook has a good discussion of this, but uhm, I'm going to, uh, give two reasons.


[User] Please transcribe this text

[Assistant] They seem to correspond to groups defined in terms of how people treat you and how people think about you as opposed to your DNA.


[User] Please transcribe this text

[Assistant] And to the extent that turns out to be true, that would mean that a genetic explanation is not reasonable for those differences. A second factor is that we know IQ can differ radically.


[User] Please transcribe this text

[Assistant] Without any genetic differences at all. And the most dramatic evidence of that is the Flynn effect.


[User] Please transcribe this text

[Assistant] The Flynn Effect is one of the freakier findings. The Flynn Effect is the finding that people have been getting smarter.


[User] Please transcribe this text

[Assistant] And the IQ tests hide that. Here's why they hide that. They hide that because they always make 100 the average.


[User] Please transcribe this text

[Assistant] So, you come home and say, Dad, Dad, I just did an IQ test. I got 120.


[User] Please transcribe this text

[Assistant] And your father says, good work son, I got a hundred and twenty-two when I was your age.


[User] Please transcribe this text

[Assistant] But what neither of you acknowledge is your test was much harder. As people got better, they had to make the test harder and harder. And this is plotted by the Flynn effect. Uhm, one of these lines is, uhm,


[User] Please transcribe this text

[Assistant] What this means is you take your person who's average now.


[User] Please transcribe this text

[Assistant] And push him back through time, 20 years, 30 years, uhm, he would do much better than average. Nobody knows why people are getting smarter. Uhm, and there's different theories of this. And in fact, well, wait till you see a reading response.


[User] Please transcribe this text

[Assistant] Almost everything that's not genetic is due to non-shared environments. The behavioral genetic analyses, uhm, suggest that uhm,


[User] Please transcribe this text

[Assistant] When it comes to personality or intelligence then an adopted child is no more similar to his siblings than he or she is to a stranger.


[User] Please transcribe this text

[Assistant] To put it a different way, the IQ correlation with genetically unrelated adults who are raised in the same family is about zero. Suppose the Bloom family all has an IQ of 104, and we adopt a kid. What will this kid's- we adopt him as a baby. We raise him to be a 20 year old. What's his IQ? Answer, we have no idea.


[User] Please transcribe this text

[Assistant] Because the IQ of the Bloom family who are unrelated to him has no effect at all.


[User] Please transcribe this text

[Assistant] If you think about the implications of it, it becomes controversial. Uhm, and Newsweek, I think, caught the big issue when they put in their title of question, Do Parents Matter? And the question, and the issue is,


[User] Please transcribe this text

[Assistant] Parents are shared environment. To say shared environment does not affect your intelligence or your personality, uhm,


[User] Please transcribe this text

[Assistant] Your gene, your intelligence or your personality. This isn't to say your parents didn't have a big effect, uhm, on your, on your intelligence and personality. Your parents had a huge effect on your intelligence and your personality. Around .5, actually. They had this effect at the moment of conception.


[User] Please transcribe this text

[Assistant] From then on in, they played very little role in shaping you what you are. The case for this...


[User] Please transcribe this text

[Assistant] And many of you have probably heard this. The poem goes like this. They fuck you up, your mom and dad. They may not mean to, but they do.


[User] Please transcribe this text

[Assistant] They fill you with the faults they had and add some extra just for you. Uhm, the last line of the poem, the last, uh, bit of the poem ends,


[User] Please transcribe this text

[Assistant] Man hands on misery to man. It deepens like a coastal shelf. Get out as early as you can and don't have any kids yourself. It's beautiful. Uhm, Harris wrote a rebuttal.


[User] Please transcribe this text

[Assistant] How sharper than a serpent's tooth to hear your child make such a fuss?


[User] Please transcribe this text

[Assistant] It isn't fair, it's not the truth. He's fucked up, yes, but not by us.


[User] Please transcribe this text

[Assistant] You must be thinking, of course there must be an effect of shared environment. Of course parents have an effect. After all, good kids have good parents. There is no doubt at all that this is true.


[User] Please transcribe this text

[Assistant] Another possibility is, it's the parents who are affecting, sorry, it's the child who's affecting the parents, not vice versa. And to illustrate this,


[User] Please transcribe this text

[Assistant] And I really find this a fascinating study. It was reported last year.


[User] Please transcribe this text

[Assistant] I like this study because I have read, I must have read in my career a thousand studies. And this is the worst study ever done in the history of science.


[User] Please transcribe this text

[Assistant] Here's the even weirder part. They didn't factor out age. So think about this. Their sample included children ranging from 12 to 17. But let me tell you something about 12 year olds.


[User] Please transcribe this text

[Assistant] But most of these criticisms apply to that study too. A bookish kid is more likely to get his parents to read to him.


[User] Please transcribe this text

[Assistant] A good family, a, a, a parents who are good parents in general are more likely to, to do all sorts of good things to their kids and have good kids besides.


[User] Please transcribe this text

[Assistant] Take another case, the so-called cycle of violence. Yes, it's true. Parents who smack their kids tend to have, statistically, more violent kids.


[User] Please transcribe this text

[Assistant] And you might think you know. When you become famous and you stand up and you get your awards, maybe you'll thank your mom and dad. When you go to your therapist and explain why you're so screwed up, maybe you'll blame them. He never took me to a baseball game. Well, maybe. Maybe. But you don't know. Were you adopted? If you weren't adopted,


[User] Please transcribe this text

[Assistant] One, one response to Harris' book is this. Look, even if this is true, you shouldn't let this get out.


[User] Please transcribe this text

[Assistant] Because if parents don't mold their children's personalities, maybe why should they treat their kids nicely?


[User] Please transcribe this text

[Assistant] And you might be wondering this, you might be thinking, well gee, if you don't have any effect on how your kids turn out, uhm, why be nice to them?


[User] Please transcribe this text

[Assistant] You might want to be nice to them because you want them to be happy. You might want to be nice to them because you want to have good relationships with them.


[User] Please transcribe this text

[Assistant] And I have a little bit more, but I'm going to skip it, and I'm going to move right to your reading response, which is very, very simple, easy to, easy to answer, easy to grade. Explain the Flynn effect. It's a toughie, so just explain that. Uhm, okay.


[User] Please transcribe this text

[Assistant] You look like that kind of guy I wanna get to know. You look like you just jumped off the boat, Nico. Handsome man like you should get some new threats. I think he looks fine the way he is. I don't think he even changed out of those things on the journey. How you gonna impress a classy girl like Michelle? I'm easily impressed.


[User] Please transcribe this text

[Assistant] But n-n-n-n-n-n-n-nurture. Gretch, I think he's got my calves. He does, baby, he does. Can I just say goodbye to him quick? Sure.


[User] Please transcribe this text

[Assistant] What's the problem? What do you think? Michael. Mr. Faust.


[User] Please transcribe this text

[Assistant] Attack target Echo. Attack target Alpha. Attack target Bravo. Attack target Charlie. Attack target Delta. Attack target Golf. Attack target Hotel. ATV marked. Bagsy on that. Bandage here. Battle rage here. Bike marked. Bird marked. Cancel my last. Cash here. Cheers.


[User] Please transcribe this text

[Assistant] Contract phone here. Copy. Copy. Eyes on the loadout crane. Copy. Eyes on the vehicle. Copy. I see the vehicle. Copy. I'll take the ammo. Copy. I'm headed your way. Copy. I'm heading your way.


[User] Please transcribe this text

[Assistant] Copy, UAV tower. Copy, upload station. Copy, visual on the hostage. Copy, visual on the SAM site. Copy, visual on the tower. Copy your LZ. Could use a hand here. DDoS here. Dead silence here. Decoymine here. Defend Objective Alpha. Defend Objective Bravo.


[User] Please transcribe this text

[Assistant] Defend Objective Charlie Defend Objective Delta Defend Objective Echo Defend Objective Foxtrot Defend Objective Golf Defend Objective Hotel Defend The Bomb


[User] Please transcribe this text

[Assistant] Defend the carrier. Defend the device. Defend the flag. Defend the HBI. Defend the objective. Diffuse objective Alpha. Diffuse objective Bravo. Diffuse objective Charlie. Diffuse objective Delta. Diffuse objective Echo. Diffuse objective Foxtrot. Diffuse objective Golf. Diffuse objective Hotel.


[User] Please transcribe this text

[Assistant] Diffuse the device. Diffuse the objective. Diffuse the package. Diffuse the target. Destroy target Alpha. Destroy target Bravo. Destroy target Charlie. Destroy target Delta. Destroy target Echo. Destroy target Foxtrot. Destroy target Hotel. Destroy that bomb.


[User] Please transcribe this text

[Assistant] Destroy the bomb. Destroy the device. Destroy the flag. Destroy the HPT. Destroy the target. Destroy vehicle here. Drill charge here. Dropped an ammo box. Load up. Drop an ammo here. DZ is set. Eliminate the HPT. Eliminate the package. Eliminate the target.


[User] Please transcribe this text

[Assistant] ENEMY'S GOT ME! THEY'RE EXPOSING YOUR LOCATION! Engage the HPT. Extraction balloon here.


[User] Please transcribe this text

[Assistant] Friendly care package marked. Friendly chopper gunner overhead. Friendly cluster mine here. Friendly cruise missile inbound. Friendly decoy mindset. Friendly emergency air drop here.


[User] Please transcribe this text

[Assistant] Friendly gunship in the airspace. Friendly juggernaut crate here. Friendly killstreak here. Friendly recon overhead. Friendly suppression mine here. Friendly tactical insertion here. Friendly tacticals marked. Friendly UAV orbit in the area.


[User] Please transcribe this text

[Assistant] Friendly VTOL active! Get out! Get out! Get to the bomb! Get to the device! Move to the LZ! Get your ass outta here! I'm done in!


[User] Please transcribe this text

[Assistant] Got a pistol here. Got a safe here. Got a truck here. Got a valuable here. Got a vehicle here. Got advanced infantry here. Got an enemy special mission unit here. Got an MGB payload here.


[User] Please transcribe this text

[Assistant] I have an LMG. I have large cow rounds. I have lethals. I have medical. I have mid cow rounds. I have room. I have shotgun shells. I have small cow rounds. I have some tacticals. I need a kill streak. I'll have that medical. I'll have that valuable. I'll drive. I'll fly it. I'll have the buzzsaw.


[User] Please transcribe this text

[Assistant] I'm compromised, the enemy's on to you! I'm off then. I'm on the gun. I'm with you, mate. Intel here. I've got your back.


[User] Please transcribe this text

[Assistant] JLTV here. Kill the carrier. Kill street tablet here. Large caliber rounds here. Later, launcher here. Leave me. I'm done in.


[User] Please transcribe this text

[Assistant] Looting this area. LZ set, drop here. Maintaining a visual here. Marked a tank. Marking a hardened fighter. Marking gas mask. Marking HLZ. Marking lethals. Marking self-revive. Marking shotgun shells. Marking sniper rifle. Marking target area.


[User] Please transcribe this text

[Assistant] Recon tablet here. Requesting fire mission target marked. Return the device. Return the HVT. Return the package. Return with the explosive. Return with the objective. Revive pistol here.


[User] Please transcribe this text

[Assistant] Secure Bravo. Secure Charlie. Secure Delta. Secure Echo. Secure Foxtrot. Secure Golf. Secure Hotel. Secure the Device. Secure the Explosive. Secure the Flag. Secure the HVT. Secure the Juggernaut. Secure the Objective. Secure the Package. Setting Rally Point.


[User] Please transcribe this text

[Assistant] Shot stick here. Shot gun here. Smoke grenade here. Smoke wall here. Snap shot grenade here. Solid copy.


[User] Please transcribe this text

[Assistant] That's all it work. Spot a scope here. Stay quiet. Stim here.


[User] Please transcribe this text

[Assistant] Stronghold here. Heavily guarded. Stronghold marked. Low threat activity. Stun grenade here. Suppression mine here. SUV here. Attack insert here.


[User] Please transcribe this text

[Assistant] That was ace. That's our thermite. That'll do it. That's a friendly airstrike. That's a friendly counter UAV. That's an enemy armor box. That's an enemy decoy. That's an enemy suppression mine. That's enemy air support. That's friendly air support. That's mine. That's our air support. That's our close air. The bastards have been through here.


[User] Please transcribe this text

[Assistant] Throwing knife here. Too right, mate. Transport helo down. Trophy system here. UAV tower secure. Upload station here. Vehicle marked. Visual on a stronghold. Visual on an enemy tactical camera. Visual on tags. Visual on the device. Visual on the explosive.


[User] Please transcribe this text

[Assistant] Visual on the flag. Visual on the hostage. Visual on the HPT. Visual on the objective. Visual on the package. Watch that wreck, it's gonna blow. Watch yourself. That vehicle's poppin' off. Watch in this sector. We control the SAM site. We got an armor box here. We have a loadout drop here. We have a sentry here.


[User] Please transcribe this text

[Assistant] We have a tactical camera here. We have a trophy system here. We have an active recon drone. We have an advanced UAV here. Well done. Where are the rest of-


[User] Please transcribe this text

[Assistant] Yeah, cheers. Active field upgrade here. Active friendly field upgrade here. Active friendly recon is up.


[User] Please transcribe this text

[Assistant] No, discipline would imply I'm trying to make him better. So, are you married?


[User] Please transcribe this text

[Assistant] They killed off Radioactive Man? I did not see that coming. Die, Carumba!


[User] Please transcribe this text

[Assistant] Something happened to dad on that trip. This is worse than when he went to New Orleans and came back with the southern accent.


[User] Please transcribe this text

[Assistant] Yo, what's going on guys? Tanmay here for Simple Snippets and welcome back to another video tutorial on data structures and algorithms. And in this video tutorial, as the title of the video suggests, we are going to be writing a C++ program to implement stack and its stack operations.


[User] Please transcribe this text

[Assistant] We took a theoretical representation and understanding of what exactly is a stack data structure, how it operates, that is the different modes, that is first in last out or last in first out.


[User] Please transcribe this text

[Assistant] And we also have the different stack operations as well as some applications.


[User] Please transcribe this text

[Assistant] So that video was pretty much theoretical, but we also saw behind the scenes what happens and we also tried to visualize what exactly a stack looks like by taking a diagram. So if you have missed that video, do check it out. I will drop the link.


[User] Please transcribe this text

[Assistant] But if you are just here for the implementation that is the actual C++ program for stack operations and stack implementation, then this video is exactly the right one.


[User] Please transcribe this text

[Assistant] And you can see a time code wherein you can directly skip to the coding part. But before we jump to that coding, I just wanted to take a quick look at our approach that we are going to be using.


[User] Please transcribe this text

[Assistant] But I just wanted to discuss quickly how our algorithm and how our approach is going to be. So here is a representation of a stack. So you can see we have five positions of the stack. So this is something that our stack would look like.


[User] Please transcribe this text

[Assistant] Items will be going in like this. So that would be push. Now we've already discussed all the theory part before and then they would be popped off from the top, right? So that's how the stack works. First in last out or last in first out.


[User] Please transcribe this text

[Assistant] So here let's take an example of a stack with a size of 5. So you can see we have 5 memory blocks.


[User] Please transcribe this text

[Assistant] So I'll start from zero because we're gonna be using arrays to implement stack. So this is index position zero. Then we have one, two,


[User] Please transcribe this text

[Assistant] Okay, and this is going to be the top of the stack, right? So how do we implement all these


[User] Please transcribe this text

[Assistant] Functions in terms of a programming language in terms of the implementation part.


[User] Please transcribe this text

[Assistant] We will be creating a class in C++ programming and I hope you know the object oriented programming concepts. If not, I have a complete C++ programming playlist also. So what we will do is we will create a stack class. Okay. Inside that we will have an array. Okay. As a data member.


[User] Please transcribe this text

[Assistant] We will give a hard coded size five just for understanding purpose. You can do the dynamic memory allocation part and take in the size of the stack separately. So we are implementing.


[User] Please transcribe this text

[Assistant] Array as a stack. Okay, so we're going to be using array to store the values, but it is going to be operating like a stack. Okay.


[User] Please transcribe this text

[Assistant] And one very important thing that we are gonna have is a variable which is known as top. Okay?


[User] Please transcribe this text

[Assistant] And initially it will be assigned a number of minus one. Okay, so it is going to be integer variable.


[User] Please transcribe this text

[Assistant] Now what this top variable is gonna do is it is gonna keep a track of how many number of elements are inserted in the stack. So as I mentioned initially the top is gonna be having a number of minus one. So essentially if this is zero, let's imagine minus one to be somewhere over here. Okay. And the top variable initially will be pointing over here as minus one when we have no values in the stack.


[User] Please transcribe this text

[Assistant] So let's say I push a value which means I add a new value inside the stack. Let's say I store 5. Let's assume that our array is going to be an integer type array. Okay, so I'm going to push a value of number 5.


[User] Please transcribe this text

[Assistant] So it's gonna be added at the bottom of the stack, right? In this case, what we will do is we will say top plus plus, okay? Which means we will increment this from minus one and now the top will be pointing.


[User] Please transcribe this text

[Assistant] To the zero location or it will be storing a value of zero. Okay?


[User] Please transcribe this text

[Assistant] So do note that it is not a pointer. We have a concept of pointers also in C++, but this is a simple variable which is just storing


[User] Please transcribe this text

[Assistant] Our top will be having a value of minus one and not pointing. Don't confuse yourself with the word pointing.


[User] Please transcribe this text

[Assistant] Right now it's not a pointer, it's just a variable. Okay, so that's the concept of push and pop.


[User] Please transcribe this text

[Assistant] Similarly for other operations like is empty, is full, when we have count, we have change, we have peak, and we have display, we will be extensively using this


[User] Please transcribe this text

[Assistant] So let's say we want to check for is empty. So what do we have to check is if top value is minus one. So when top is going to be minus one, it is going to be pointing or it is going to be having a value of minus one, right? It is going to be storing minus one when the stack is going to be empty.


[User] Please transcribe this text

[Assistant] So we just have to check for if the value inside top is equal to minus one and then we can say that the stack is empty. Similarly, if you want to check if the stack is full, what we have to do is we have to just check if the value inside top is equal to four. So when the top value is going to have four,


[User] Please transcribe this text

[Assistant] We can say that the stack is full, right? And then similarly we can get count. We can use the change by accessing the index position since it is an array.


[User] Please transcribe this text

[Assistant] So we will pass the index position of the array and change the value in the stack.


[User] Please transcribe this text

[Assistant] We can also peek, which means we can access the item at i position. Now, peek and pop is different. Pop will just remove the topmost element. Using peek, we can access any of the element.


[User] Please transcribe this text

[Assistant] So pushing is going in and pop is getting it out from the top of the stack. Then we have display display is displaying all these data values inside the stack. Okay. So this was a little bit of visual representation.


[User] Please transcribe this text

[Assistant] Okay, so as you can see, I have already opened up my DayC++ IDE, and for those who don't know, this is


[User] Please transcribe this text

[Assistant] A very old school IDE for C++ programming. If you have code blocks or if you're using NetBeans or if you're using Microsoft Visual Studio IDE, everything is good to go.


[User] Please transcribe this text

[Assistant] As long as you're comfortable. I've been using this IDE for long time for C++ programming, so I'm gonna stick with it.


[User] Please transcribe this text

[Assistant] So we have the two header files. We are using namespace standard and all. And this is the class that we are creating. So I've named the class as stack. Inside that we have the private and public access modifier.


[User] Please transcribe this text

[Assistant] Now the reason why I'm hardcoding this is because we want to keep it simple. You can also take the size of the array dynamically.


[User] Please transcribe this text

[Assistant] And then we have the integer variable top which is gonna be keeping a track of the number of entries in the stack, right?


[User] Please transcribe this text

[Assistant] Now inside the public section, we are going to be implementing all the operations.


[User] Please transcribe this text

[Assistant] So starting off, let's first create a default constructor. I hope you know the basics of object oriented programming, especially the oops concepts that is the classes and objects, the constructor and functions concept. That's all you need.


[User] Please transcribe this text

[Assistant] And as I mentioned, I have a complete C++ programming tutorials playlist that would be more than enough. You can check it out if you have any doubts in the programming part. So let's create a constructor. So I'm going to say stack.


[User] Please transcribe this text

[Assistant] Now inside the constructor, I'm gonna assign top as minus one. So the constructor is obviously called whenever we create an object for the first time.


[User] Please transcribe this text

[Assistant] So for the first time, obviously everything inside the array is gonna be nothing, right? So our stack is gonna be empty. So that's why I'm also gonna create a for loop. Starting from int i to i less than 5.


[User] Please transcribe this text

[Assistant] The stack is going to be empty, which means everything inside the array has to be assigned as zero. Okay, so that's what we are doing in the default constructor, which will be called whenever you create an object. So this is simple fair enough. Now, let's start implementing.


[User] Please transcribe this text

[Assistant] Some basic functions or the operations. Let's start off with is empty. Okay.


[User] Please transcribe this text

[Assistant] When you create a stack, we assign the top data member value as minus one.


[User] Please transcribe this text

[Assistant] Because there is nothing inside the stack, which means that it is empty. So that is what this function is checking for. And I'll tell you why we need that. That is why we need this is empty and


[User] Please transcribe this text

[Assistant] Is full method because we have to check for two conditions that is stack overflow and stack underflow also. So you'll quickly understand when we move ahead. So now let's create another method which is bool is full. Okay, so this function is going to check if the stack is full or not. So here I'm going to say if top equal equal to four return true.


[User] Please transcribe this text

[Assistant] We know that the array index starts from zero and initially the top is gonna be pointing to minus one. So when there is one value inside the stack, the top will be incremented and the top will be pointing to


[User] Please transcribe this text

[Assistant] So that's why I'm equating it with 4. So you'll understand when we actually


[User] Please transcribe this text

[Assistant] And we need to pass some value, right? What value are you pushing into the stack?


[User] Please transcribe this text

[Assistant] Now we know that our stack is kind of like an integer stack because


[User] Please transcribe this text

[Assistant] It has an integer array so it can only store integer values. So I'm going to say push int val. So I'm passing an argument of integer type which we will pass in the program which will be stored in the array. Okay. Now before we push any value in the stack.


[User] Please transcribe this text

[Assistant] We need to know whether the stack is full or not, right? So if the stack is full, then we cannot push any extra values. So that's where this boolean is full method is gonna come into picture.


[User] Please transcribe this text

[Assistant] By the way, when the functions are inside a class, they are known as method. So if I jump or switch between function and method, they are one and the same right now. I tend to mix up those two words.


[User] Please transcribe this text

[Assistant] Anyways, so the first thing inside the push method is we have to check for isFull. Okay, so I'm gonna say if isFull.


[User] Please transcribe this text

[Assistant] It will return true only if the stack is full, right? And if this part becomes true, the if block is going to be executed and not the else part. But if it returns false,


[User] Please transcribe this text

[Assistant] Then the else part is going to be executed. So this is where we can actually push the value that is this interval into our array, right? So now you have to imagine that for the first time.


[User] Please transcribe this text

[Assistant] The value inside the top variable is minus one, right? So we have to first increment that. So what I'm going to do is I'm going to say top plus plus. Okay, so now the value inside top is zero. And now what I'm going to say is arr of top equal to value that is this val value that we passed as an argument.


[User] Please transcribe this text

[Assistant] So for the first time imagine top plus plus which means top becomes zero over here. So for the first time we are saying arr of zero that is at the first position of the array store this value that we are passing in the push method as parameter. Okay, so I hope you are understanding.


[User] Please transcribe this text

[Assistant] Now the next time you push, again the top will be incremented by 1. So this time top would be 1. And then this new value will be stored at this 1 location. Since array index starts from 0. So that's why we started from 0. Okay. Seems fair. So that's our push method.


[User] Please transcribe this text

[Assistant] Similarly, let's create the pop method. Now for the pop method, the return type has to be integer because what happens is pop removes the first or the element on top of the stack and it is returned, right?


[User] Please transcribe this text

[Assistant] In push we are not fetching something, in push we are entering some value.


[User] Please transcribe this text

[Assistant] In pop we are removing the first or the top of the stack value and removing it off completely. So we have to return it. So that's why I'm giving a return type of this method as int and then we'll name it as pop.


[User] Please transcribe this text

[Assistant] And here we don't have to pass any value because we want some value outside. We want to remove some value from the stack. So let's do that.


[User] Please transcribe this text

[Assistant] Again, here we have to check whether the stack is empty or not.


[User] Please transcribe this text

[Assistant] And when I'm seeing there is no value, it means that the value is zero. Okay. It's not like there is nothing. It means that the value is zero. So you'll understand when we actually run the program right now, just follow along. So I'm going to say if, and I'm going to say is empty, which means I'm checking if the stack is empty. And if it is empty, I'm just going to copy this and print stack underflow. That's another condition, but we have to still return some value, right? So I'm going to say return.


[User] Please transcribe this text

[Assistant] What we want is we want the value which is at the top of the stack, right? So, I am going to say else.


[User] Please transcribe this text

[Assistant] After we store the actual value inside this pop value variable, this is a temporary variable which you are creating inside because this is the value that we are returning from this pop method. Okay. Then we make that value as zero in the array and we also have to decrement


[User] Please transcribe this text

[Assistant] Then we made that same top of the stack value as zero because


[User] Please transcribe this text

[Assistant] In pop, we also have to make it 0, that is we have to remove that value off. And then we reduce the top value by 1.


[User] Please transcribe this text

[Assistant] And then we return that value. So this has to be in the same order. If you change the order, the output will be different and it will go wrong.


[User] Please transcribe this text

[Assistant] Let's see what is left out now. So we've created four important methods in the stack operation, implemented the four important operations. Let's implement the other ones.


[User] Please transcribe this text

[Assistant] So it returns some value, so that's why I'm gonna say int, because our stack is an integer stack, that is it is storing only integer values in the array. Always the return type is gonna be int. I'm gonna say int count.


[User] Please transcribe this text

[Assistant] Because remember, the value stored inside top is the index position, which is always going to be 1 less than


[User] Please transcribe this text

[Assistant] The actual number of values inside the stack, right? So that's why you have to do plus one and return it.


[User] Please transcribe this text

[Assistant] And that's about it. This is very small operation, small method. Let's move ahead.


[User] Please transcribe this text

[Assistant] Let's implement the peak operation. So I'm going to say int peak. Now what peak does is you pass a position. So we have to pass a position. I'm going to say int pos and whatever position you pass, that is the index position, the value at that position is returned in this method. So that's why the return type of this method is int. Okay.


[User] Please transcribe this text

[Assistant] So first, obviously we'll have to check if the stack is empty, right? So I'll say is empty. If it is empty, we will copy this code and we'll just print it over here.


[User] Please transcribe this text

[Assistant] And depending upon that position, we are just accessing that value. We are not deleting it in pop. We have to also remove the top of the stack, right? So that's why peak is a little different. So this is the peak method. Let's move ahead. Now, the next method is change.


[User] Please transcribe this text

[Assistant] So in change what we are doing is we are changing the value inside the stack.


[User] Please transcribe this text

[Assistant] Which means we are changing the value inside the array at a particular position.


[User] Please transcribe this text

[Assistant] So here we need two information that is the position as well as the value. So I am going to say void change. So we are not fetching any value so that's why the return type is void. But here we need to pass two information as I mentioned we need to pass the position as well as the value that is supposed to be changed, right? That is the new updated value.


[User] Please transcribe this text

[Assistant] You have to say arr of position is equal to value and just print a message item changed at the location. Okay. Or you can say value changed at the location and the location is passed over here. Okay.


[User] Please transcribe this text

[Assistant] So that's about it. Now the last operation that is left out is the display operation.


[User] Please transcribe this text

[Assistant] And display operation as the name suggests is going to display all the values inside the stack in a descending order which means that the array has to be printed from


[User] Please transcribe this text

[Assistant] Higher value to the lower value so that it looks like it is a stack. Which means that the value at the zero index position has to be at the bottom, right?


[User] Please transcribe this text

[Assistant] So here's the method, I'm just gonna directly print it because it is very basic. So this is that display method. Inside that I'm just seeing all values in the stack are and I'm starting from i equals to four. That is the index location four.


[User] Please transcribe this text

[Assistant] Which means that it is the highest value index of the, of the array and then I'm doing i minus minus. So array index four would be printed first. That is the value at the array index four, then three, then two, then one. So it will look like a stack. Okay.


[User] Please transcribe this text

[Assistant] And I know the code is actually going a little lengthy and I'm going a little slow because I want you guys to understand it thoroughly. And now we can move to the main function.


[User] Please transcribe this text

[Assistant] So everything that we were doing that is creating this entire class you can see is outside the main function and now our complete class is ready.


[User] Please transcribe this text

[Assistant] So in the main function, what we have to do is we have to create a menu. Now depending upon the option that we select, we have to call this individual function, right?


[User] Please transcribe this text

[Assistant] So we have 8 different operations. So we will create a menu which has 8 options and depending upon what option number we select, we will call that particular operation.


[User] Please transcribe this text

[Assistant] Now we can create that menu based system using a switch case and we'll use it inside a while loop so it can be iterative also.


[User] Please transcribe this text

[Assistant] So let me just quickly type in the code, you'll easily understand what I'm talking about. First things first, I'm going to create an object of stack and three variables, option, position and value. So you'll understand why I'm creating that. And the next thing that I'm going to do over here is I'm going to say do and I'm going to say while. So I'm using a do while loop because we want a menu driven output.


[User] Please transcribe this text

[Assistant] Which will give us some options. So that's why it has to execute one time for sure, right?


[User] Please transcribe this text

[Assistant] Each operation, each stack operation and option number starting from 1 to 8 and if I input 0 then I exit the program. So that's the ideology over here. So I'm just going to paste the entire