Okay, so at the end of the last video, we had a data frame called mod specs, which looked like this as it's printed to the console. It has 96 rows and five columns, and each row gives us the information that we need to specify a model that we want to run. Now we have this specification grid. The next step is to take one of these rows and use it to create a regression model and then extract the results that we need. We're only really interested in the coefficient for the association between cognitive ability and BMI. So we don't need to return the full regression model object, as this would include things like the data that was used to run the model. We're gonna write the code out for one model first to be as general as possible, so that it would work regardless of which row of the specification grid we fed into it. Once we've written the code once, we're gonna turn it into a function, and that function will take a single input spec ID so that it can extract the appropriate row from the specification grid and then run the appropriate model and get the appropriate results. Again, it's easier to use spec ID than to pass all the information in separate arguments to the function as this can get cumbersome, particularly where the number of columns in the specification grid is large. It is also more adaptable if we want to add further columns to the specification grid down the line. Let's start by setting spec ID to one so that we have a particular row of data to work from. There we go. Next, we want to use spec ID to obtain the relevant row from the specification grid. Here, I'm just going to use the filter function to return rows where a particular condition is true. So we're gonna take mod specs, and then we're gonna filter to where the column spec ID is equal to spec ID. Now, this bit of code that I've just run isn't going to work. And the reason for this is that there's an external object called spec ID, which contains the value one, but then there's also a column within mod specs which has the numbers, sorry, there's a column within mod specs with the column called spec ID, which goes from one to 96. By default, the functions within the tidyverse are going to use the column within the data frame rather than an external object. So this statement just says, give me back those rows where the column spec ID is equal to the column spec ID. If we want to refer to an external object, we can do so using the bang bang operator, which is this exclamation exclamation mark. This explicitly tells us to look for the object in the external environment. So now when we run this, we just get one row back where spec ID is equal to one. Let's save this object as spec, the specification that we want to use so that we can refer to it easily later. Okay, this is what spec looks like. We can extract columns from the spec using the dollar sign operator. So to get the foop, the age of follow-up, we can just do spec dollar foop. To get the cognitive ability variable, we can do spec dollar sign cog var. Now we're going to take the information contained in this single row of data to run a regression model. There's a few things we need to do. First, we need to subset the DF data frame to get back just those observations we need to run the model. That is the data from a particular cohort and follow-up page. Second, we need to specify the model formula. That's the names of the outcome and the exposure variables and the sets of the covariates control variables that we want to add. Third, we want to run the model and extract the results that we need. In this case, the coefficient for the cognitive ability variable. Let's first subset the DF data frame. From the spec, the observations that we need are from the age 15 follow-up for the baby boomer cohort. We can do this subsetting using the filter function. So we'll take DF and we'll pipe it into filter. We want to keep where cohort is equal to spec cohort. This is given us back too much information. It's given us 30, 30,000 rows, but it's given us observations at age 15, 25, 35, and so on. We can add multiple filter statements within one function call just by separating them with columns. So with commas, these are combined with and. So we're going to keep the rows that have cohort equal to baby boomer and fob equal to 15. Great, so now we've got back the 5,000 rows that we need. They're just from this age 15 follow-up. Let's save this data frame as DF mod so that we can refer to it later. Okay, so the next thing we need to do is specify the formula for the model that we want to run. I'm going to use the glue package to do this because it's got a very straightforward syntax for constructing strings. Glue is part of the tidyverse, but it's not a core tidyverse package. So it needs loading separately. So we can just use library and then glue to load it. The main function within glue is called itself called glue. I'm going to create an object called x, which is going to be a vector one to seven, yeah, containing the integers one to seven. I'm going to quickly use this just to demonstrate how glue works. So that's x saved. And then we've got one, two, three, four, five, six, seven. To create a string using glue, we just write out some text and then within curly brackets, we provide the name of an object or we write a function. Glue will run R in the background and place the results that are within this curly brackets directly into the string. So for instance, if we use glue to create a string containing the mean of one to seven, we can do that using curly brackets mean x, and we can add some explanatory text to that. So the mean of one, two, seven is four, because within curly brackets, it's mean x. The mean of the object x is the mean of the vector one to seven, which is four. We can use this glue function to create model formulas. So we want to regress BMI on a measure of cognitive ability plus some control variable. So let's just have a quick look at spec again. So the first thing we can do is add in the cog var. So let's just do BMI curly brackets spec cog var. Let's just run that. Now you can see we've got BMI tilde cog non-verbal. So we've got the right variable specified there. We also want to add some control variables and we can specify another set of curly brackets, do mod covars, double square brackets, and then spec covars. So this will replace spec covars with basic. Mod covars basic will just be the set of control variables for the basic model. So now when we run this, we've got BMI cog non-verbal plus age plus female plus social class. And this gives us the correct formula string. We need to do one more thing though, which is to change this string from a string to a formula type object. And we can do this using the as formula function. Regression functions like LM, which you use for linear regression, require a formula object to specify the model. So let's just quickly pipe this into the as formula function. You can see it has an environment now, which shows you that it's a formula type object. Let's just quickly save that as mod formula. Okay, so we now have the data in DF mod and a model formula in mod formula, which is all we need to run the regression model. Let's do that and save the result as an object called mod. So we have mod, LM, mod formula, and data equals DF mod. Let's quickly just call summary mod to see the results. So we've got an intercept, we're coefficient for cognitive verbal and coefficients for the other control variables. Now this mod object is quite complicated. It's got the data that we use to run the regression model and lots of other extraneous information. Really, as I said before, we just need the coefficient for cognitive verbal and some of the related estimates like the standard error for that coefficient, the p-value and the confidence intervals. To extract just this information, we can use the broom package. Broom is another tidyverse package, but it's not a core one, so it needs loading explicitly, so library broom. Broom contains a set of functions that extracts model information and put the results into data frames, which makes it particularly useful to work with. So we're going to use the tidy function from broom, which takes a model object and returns a data frame with the coefficients and related estimates. So that's tidy mod. We're also just going to specify the confidence argument to return the confidence intervals. So when we run that back, you'll see it returns a table with a row for each of the different coefficients of the model. So we've got one for the intercept, CognomVerbal and the three different control variables. This is still a bit more information than we need. So let's first use the filter function to get just the row for the cog file that we're interested in. So we can pipe this into filter and we can do term equals spec cog var. There we go. It's also got a bit too much information in terms of the number of columns. So let's just use the select function to return just those columns that we need. So that's the estimate, the standard error, the p-value, the confidence intervals, comp flow and comp high. Great, that's everything we want. So in a few lines of code, we've been able to take a spec ID, use it to prepare data and run a regression model and then extract to the appropriate results. Let's turn the code above into a function now so that it can be reused. Let's call this function get a lamb and it will take a single input spec ID. So we do get a lamb function and then we'll just name the particular argument that we want, single argument called spec ID. And I'm just going to copy and paste this stuff from above and put it straight into the get a lamb function. I'm going to tidy this up a slight bit. So I'm gonna rename the result of the tidy function as ret. I'll put a return statement in as well. I'll remove summary mod because we no longer need it. I don't need this bit about loading library glue and using the X's, so I can get rid of that. And also the stuff where I've just repeatedly called on spec. Okay, so let's just save that as get a lamb and then we can have a quick look at whether this works. So let's just run get a lamb one and we've got the same result as we had before. So an estimate of 0.1969. We can also just change the input to 15 to get the result of the 15th row. So now we've got 0.48. Great, and there you have it. That's the results for the first specification of the 15th. In the next video, we'll see how we can precisely run this code for all the specifications in our specification grid. Thank you.


Well hello again children it's Santa with another edition of Spooky Santa where I tell you spooky tales around the holidays today I have three more very creepy stories 12 year old Vivi she said to me a creepy true story that actually happened to her it's called she's going to be mad author Boyd Reynolds brings us a holiday horror called finders keepers but first I'm going to tell you about a demonic little dwarf in Belgium called Black Peter and remember if you want to write a scary story for me you can email it to me at letters at spookysanta.com I love scary stories from children now bolt your doors lock your windows turn off your lights pour a mug of hot cocoa it's magic you know and come with spooky Santa for another holiday chill. Many people have never heard of Black Peter or Zwarte Piet he is a demonic dwarf from Belgium and the Netherlands and he appears every Christmas as an evil helper for me now for the Dutch and the Belgians they know me as Saint Nicholas and according to legend I triumphed over this devilish dwarf in a fight and made him my slave that's not true I would never enslave anyone but that is the story Black Peter he lives in a coal mine in Spain and his skin is black because of the soot and the coal dust from the mine his hair is singed by the fire from all the chimneys that he has to climb down he spends the year spying on the children of Belgium and Holland taking note of who's been good and who has been wicked he helps me keep track of the good and the naughty kids on Christmas Eve he sets out from his coal mine squeezing himself through the narrow tunnels and writing off on his coal cart which is pulled by plague ridden undead rams every Christmas Black Peter accompanies me all through Belgium and Holland we go from house to house I of course give presents to the good little children and while I do that Black Peter takes delight in punishing the kids on my naughty list children who misbehave they do not receive any presents from me instead Black Peter will leave a bundle of twigs or a lump of coal in their Christmas stocking as a warning I don't leave the coal that's Black Peter's job if the children have been really bad or they've not heated Black Pete's warning he will snatch them from their beds and throw them into his sack which is full of hungry rats he kidnaps the boys and girls and takes them back to his coal mine where he chains them up and makes them his slaves the poor children are forced to dig coal forever while Black Peter abuses himself by poking them with sharp pins if they ever grow too sick or tired of working though Black Peter will eat them so as the song goes be good for goodness sake I love getting emails from all of my good boys and girls and I especially love those who send me scary stories that they've written or of things that have truly happened to them if you would like to send me your scary story you can email it to me at letters at spooky santa.com that's letters at spooky santa.com or tell your story to your mom and dad and they can email it for you then when I receive it I'll be able to share it with all of my good boys and girls in a future episode today I received a very creepy story from VV she's 12 years old and lives in Boulder Colorado and she wrote a story that she says is true that it really happened to her she calls it she's going to be mad here is VV's story I was babysitting my three-year-old sister once we were playing out in the yard and I asked her why she wouldn't ride her tricycle she told me she's going to be mad well I didn't think anything of it I picked my sister up and tried to sit her on her trick I never heard my sister scream so loud kicking me and crying while saying she's going to hurt me she's going to hurt me she said it over and over well I freaked out and just walked inside the house with her all day I kept asking her if everything was okay and she said yes she's not mad anymore oh I wonder who your three-year-old sister was seeing a ghost perhaps oh that is a scary story VV thank you so much for sending it to me now for my final story it's from Boyd Reynolds and it's called finders keepers you see in Germanic folklore Christmas is not only a time to rejoice it's also a time to fear for wherever children sleep Krampus is near here's the story which present do you want to open Ricky stared at his mountain of gifts wrapped boxes of every size mushroomed out from beneath the red glowing Christmas tree remember his mother said you can only open one on Christmas Eve her smile grew wide as she teased him wagging a finger in the air a crease ran across Ricky's just one he said irritated I want them all now you know the rules his father's voice was stern don't be greedy you'll have your fill tomorrow morning now pick one before we change our minds Ricky frowned making sure that both his parents saw him then he made his way toward the enormous Christmas tree it towered over him glowing like a fiery inferno like a detective examining a crime scene Ricky investigated each box as per usual he reached for the biggest gift he could find yet before touching it something else caught his attention out of the corner of his eye an oddly shaped present made him stop quietly he withdrew his hand and looked at the strange prize sitting atop the mantle above the fireplace it was bright red and poorly wrapped he didn't know why but his hand was drawn to it good choice his father said sitting in front of the roaring fire Ricky gazed at his gift the shape was awkward much like a warped banana he opened it carefully emerging from the wrapping was the weirdest doll he had ever seen it was made of dark wood and had a huge head with tiny legs and arms it wore a half moon jester's hat on its head had big black eyes and a rather alarming smile what is it Ricky said it's creepy I found it when I went to Germany last month for work his father said settling deeper into the couch some of the locals didn't want me to take it legend says it belongs to Krampus Krampus Ricky asked think of it as a bad Santa his father said on Christmas Eve he punishes greedy children huh Ricky grumbled shrugging his shoulders it's mine now finders capers just like all the rest of them his eyes glistened as he looked at all the toys he was to receive the next morning someday his father continued that selfishness will come back to haunt you Ricky continued to stare at his future gifts whatever his father glared at him time for bed I'll put out this fire so Santa could get down the chimney and add to this year's haul for your highness the thought of even more presents sent a wild smile across Ricky's face he picked up his doll and walked right past his father he gave his mom a kiss on her cheek and went upstairs quickly he tucked himself behind the hallway wall edging his eyes around the wall he peered down at his parents through the handrail posts running up the stairs we've made an 11 year old monster you know his father remarked he's a good boy his mother said in defense of her son she sat up from her comfortable spot on the other side of the couch crossing her arms tightly she turned away from her husband yeah he scoffed good at getting whatever he wants he's spoiled but one day he'll learn hopefully sooner than later irritated with what he had just heard Ricky disappeared down the dimly lit hallway he entered his bedroom and turned on the overhead light looking out at the hundreds of other play things littering the floor table and two beanbag chairs he wondered where to put his new present it was unique but it was still just one toy among many I guess it doesn't matter where this little thing goes Ricky thought to himself he tossed it into a pile of toys on his bedside table the doll's eyes looked up at him leaning down he turned on the night light from the table of toys it appeared something had moved he wheeled his head around but there was nothing only his new trinket stared back pre-Christmas jitters he muttered he stood up and made his way over to the door as usual he closed it only partially leaving the door open a tiny crack then he flicked off the light and made his way into bed that Christmas Eve Ricky tossed and turned he couldn't get his mind off of the presents awaiting him the next morning after a few restless hours he opened his eyes and stared out the window a full moon floated in the night sky bored he turned his attention to his new doll it was still looking at him closing his eyes he thought of how no one at school had such a toy smugly he pulled his head up to look once more at his gift only this time it was gone sitting up straight his eyes nervously looked around the room scanning every corner finally they rested on the doll sitting upright on the carpet next to his bed fear constricted around Ricky like a serpent the tiny knickknack sat as if it had been placed on the ground if it had fallen off the table wouldn't it be lying face down or on its back Ricky's nerves went into overdrive he buried his face in his pillow but his mind wouldn't let it go where was the doll now his eyes peered back out from the confines of the pillow it was nowhere to be seen he glanced at the door a sliver of light came in from the hallway and suddenly a tiny shadow appeared in the gap it was the doll Ricky shut his eyes with all his might when he looked again the door was open even farther and the tiny toy was gone as quiet as I criss-kringle on Christmas Eve Ricky pulled his body from his bed open the door and peer down the hallway there it was the doll standing near the far end without looking back the doll descended the stairs taking careful steps Ricky walked the length of the hall he made his way down the first few stairs and then sat the Christmas tree illuminated the entire room he keenly watched from behind the white handrail posts as the toy faced the fireplace and sat down the once burning logs had now turned to ash all of a sudden he heard something it was coming from the roof and sounded like someone walking tiny kernels of dirt dropped into the fireplace Ricky's heart erupted in delight Santa something rustled its way down the chimney first there was something black that poked out the bottom like a boot then came a red leg finally a figure stepped out of the fireplace but it certainly was not me no before young Ricky appeared a creature as tall as the Christmas tree itself it balanced on two hooves dark red skin climbing up its knees on its thighs ran long dark hair which continued right up to its neck its arms were much like its legs fiery red from its long black fingernails to its elbows with hair covering its upper arms most terrible of all was its face leathery red and sunken like a skull large spiral horns rested on the sides of its forehead curling angrily around much like that of a ram hello my old friend the creature said in a deep and menacing voice bending down in front of the doll Ricky's doll hello Krampus the doll said I have a gift for you I know Krampus lit gigantic fangs with a forked tongue it reached out and scooped up the play thing much like a mother would a child lifting a brown sack off its shoulder the monster dropped it in the middle of the room carefully it opened the bag and dangled the doll above coming out of the sack was a bombardment of children's voices all screaming and crying Ricky covered his ears Krampus dropped the toy inside and resealed the bag the moment it did the balling stopped but Ricky's present was gone a selfish fire brewed in Ricky's belly overtaking his fear that's mine he shouted he couldn't believe he'd said it Krampus's long pointy ears turned toward him its demon eyes followed it's yours you say finders keepers Ricky's words quivered out of his mouth in one long stride the creature moved in front of him Ricky stared at the Christmas devil paralyzed with fear look at how many presents you have boy Krampus said you cannot spare just one for me and it is mine anyway how greedy are you a blanket of shame lay over Ricky my doll brought me to you Krampus said now you will come with me to my castle on the mountain I have more toys than you have ever seen and they will all be yours you won't have to share them with anyone wouldn't you like that Ricky's eyes most all I need is a signature Krampus smiled reaching behind his back the diabolical brute unrolled a long scroll what was on it Ricky had no idea for Krampus quickly pointed to the bottom there set a dotted line awaiting a signature the fiend pulled out a long white pen that looked like it had been crafted from bone carefully it pricked the pen's sharpest end on the back of Ricky's hand ouch Ricky said a drop of blood formed only a scratch the villain licked its lips and handed Ricky the pen all Ricky could think about was a single image a gigantic pile of toys and Ricky standing high atop he gave into his selfishness and began to write looking on in horror as the red blood from his hand wrote his name on the dotted line just before finishing a desperate feeling came over him something terrible was about to happen he tried to pull the pen away but he couldn't it continued to write as if having a life of its own and completed his signature there Krampus said this contract is official bound in blood you are mine finders keepers Krampus grabbed Ricky by the scruff of the neck and tightened pulling him over the handrail Ricky gripped the rail with all his might but Krampus was too strong don't fight it Krampus said you've already given yourself to me the creature held the boy high above his head Ricky kicked as hard as he could but it was no use laughing Krampus opened the bag and lowered Ricky down inside the sack children's hungry faces glowed up at him their chalk wide hands extended and grasped his feet finders keepers the children chanted finders keepers they pulled him into the darkness of the bag the chant surrounded him being sung over and over again little hands pulling and prodding him he curled into a ball and started to weep the chanting grew louder and louder as the children smothered Ricky stop stop please he pleaded I won't be mr greedy anymore he watched the top of the bag close I promise I promise not to be greedy the chanting ceased Ricky opened his eyes the darkness was gone he was in bed looking out his window he saw the sun was up outside snow fell lightly to the ground oh it was only a nightmare he said as tears poured down his cheeks he sprang out of bed and ran downstairs his parents were waiting for him well this sets a precedent his dad said mr greedy sleeping in on your big day well wonders never cease time to open your gifts instead of diving into his presence though Ricky walked past the Christmas tree and sat right between his parents on the couch he turned to his father I want you to go first stunned his dad stood last night you wanted them all this morning you want to wait what have you done with my son laughing he walked around the tree looking for a gift to open bending low behind the fireplace he picked up something small will you look at this his father said I thought you took your new gift to bed last night Ricky's eyes grew wide when he saw it a queasy feeling consumed his stomach in his father's hand sat Krampus's doll a devilish smile crept across his father's face as he said finders keepers oh that Krampus definitely is a scary one isn't he and I wouldn't even want to mess with his doll did you like the stories I told kids if so do Santa a giant favor and tell your friends and family members about the spooky Santa podcast that way they can listen to my stories too and you can all talk about them and remember you can write your own scary story for me and email it to me at letters at spooky Santa dot com you can make up a brand new horror story or you can tell me about something scary that really happened to you send it to me at letters at spooky Santa dot com spooky Santa is a registered trademark of Marlar house productions copyright Marlar house productions now be a good little boy or girl and join me next time for more creepy tales from spooky Santa


Hi, I'm Zor. Welcome to Unisor Education. I would like to continue today talking about linear functions, and especially about graphs of linear functions. So we are talking about graphical representation of a function. Well, let me start with something which everybody knows, that the graph of the linear function is a straight line. I'm sure every student of high school or whatever knows that this is what it is. Well, but let me ask you this question. Can you prove that the graph of the linear function is a straight line? Well, that's not such a simple question because we really have to think about how to do it. All right. Here's what I suggest. This is the coordinate plane. This is x, this is y, and our function is ax plus b, where a not equal to 0. It has some graph, how straight is it? All right. Here is how I suggest to approach this particular proof. Again, by the way, there might be many different proofs. I'm just suggesting one of those. We all know from geometry that the shortest distance between two points on a plane is along the straight line between them, right? So if you have two points, then the shortest distance is along the straight line. Well, by the way, this is something which I have covered in geometry part, and you definitely can recall or go into this part and check how it works. Okay, this is one property which I would like to use to prove that the graph of this particular function is a straight line. Now, graph of this function goes through certain points, right? Point x is an argument which is here, and y as a result of this application of this function would be here. This is x, this is y. That's how we basically draw the graph. What I suggest is the following. Let's have three points on the graph. Let's call it u, these are arguments, and w. These are values. This is a u plus b, this is a v plus b, and this is a w plus b, right? I would like you to recall another property. Again, it's geometrical, basically. It's the Pythagorean theorem. If you have two different points, let me just put another drawing. If you have two different points, one with coordinates a and b, another with coordinates c and g. So this is a, this is b, this is c, and this is b. What's the distance between these two points? Well, obviously you can draw the parallel line here and here. It would be the right triangle. And this is hypotenuse, and these are two calculatives. So this calculative is c minus a, right? c minus a gives you points of these calculatives. And this calculative is g minus b. So using the Pythagorean theorem, the distance between these two points would be a square root of the square of these calculatives, which is c minus a square, plus square of this calculative, which is g minus b square. So square of hypotenuse is equal to the sum of squares of topazity. That's why this is the formula for the distance between these two points with coordinates a, b, and c, d. So I will use this to calculate the distances. So basically that's enough of the preliminary information which I need to prove that this is a straight line. And here is how. I will calculate the distance, let's call this u, v, and w points. These are lower cases, and this is upper cases. Now I will check the distance between u and w, and then I will compare it with sum of distances from u to v and from v to w. Now I know that from u to w the distance is the shortest distance, it goes along the straight line. Now if I will be able to prove that some of these two distances is exactly the same as the distance from u to v, it actually means that we cannot lie outside of the straight line, because as you know again from geometry, it's the straight line which is the shortest distance. So if sum of these two distances is exactly the same as this, it's supposed to lie on the same line, on the same straight line. So that's why this is not the case. So all I have to do to prove that the graph is a straight line, I have to choose randomly completely three points, I call it u, v, and w at the argument, draw or construct whatever three points on the graph, and check the distance between two extreme points and sum of two distances between the left extreme to the middle and from middle to the right extreme. Now when I'm saying middle doesn't mean it's really in the middle, it's somewhere in between basically, right? So three completely no restrictions, let's just assume that u is less than v and v is less than w for simplicity, and then after I choose these three numbers, I substitute these three numbers to linear functions expression to get these three values. Now I have coordinates of all these three points, now having coordinates I can find the distance using this formula which I was just talking about, and then I compare the sum of these two distances with the sum of the distances between u and w. So all I have to do is to prove that the distance from u, let me use the upper case, the distance from u to w is equal to the distance from u to v plus the distance from v to w. I use the distance between two points as an absolute value and these are points actually on the plane, u, v, w, these are points. So that's what I have to prove using the formula for the distance.  So if I have any three points and connect the two extreme points with a straight line, the any point in between should also lie on it, which means it's one and only one straight line. So how can I prove this? This is just a technical issue nowadays, right? So let's calculate what's u w, distance from u to w? Coordinates of the u are lower case u and a u plus b, coordinates of the w is lower case w, a w plus b. So the distance between them would be square root of square of the distance between w and this plus square root, plus square of the distance between two values of the y. So it's a w plus b minus a u plus b square. This is u w. Well let's simplify this. Obviously if you will open these parentheses you will have a w plus b minus a u minus b. So b will be reduced. So you have a, you can bracket it out, factor it out with the w minus u, right? So that's exactly what I will do.  So I put square here and square here, right? Square of this entire expression is square of this times square of this. Now I can factor out w minus u square, which means what? Which means square root of w minus u square and in the parentheses it will be 1 plus a square, not equal. Now I will use the w is greater than u so I can just put it outside of the square root and that's what I will get. That's it. That's all I need. So let's put it here. The distance from u to w is equal to w minus u square root of 1 plus a square. Okay. Now we will do very similar operation with this and this and check what happens. If I know how to calculate the distance from u to w and this is this formula and it's important that w is greater than u so this is positive, then very analogously the distance from u to v would be equal to v minus u square root of 1 plus a square, correct? I mean there is no difference. I mean I'll just use letter v instead of letter w. What's important is that the first letter is greater than this one and v is greater than u, right? Now similarly for v and w from v to w, I will also use the same thing instead of u I will put v so it's w minus v square root of 1 plus a square. Now we basically see that this sum of these is equal to what? v minus u plus w minus v square root of 1 plus a square, right? Minus v and v and we have w minus which is exactly the same as this. This is a very easy proof that the line which really represents the graph of the linear function a is equal to ax plus v is a straight line. I think it's important to not only know that this is a straight line but also being able to logically prove that this is a straight line. The only purpose of whatever we are doing here is to basically to stimulate you to think about certain things logically. Don't take it just from the face value. If somebody told you this is a straight line, prove it. It's very, very important. That's what words do. They prove the points, right? That's what doctors do. They prove that their diagnosis actually is correct diagnosis based on whatever symptoms they observe to the patient, etc. So there are many examples. What's important is never take anything just as a belief, as a statement without any kind of a baking. The proof is always very, very important. Okay, so we have proven that the line which represents the graph is a straight line. Now, what about the graphical meaning of coefficients a and b? That's actually very important as well, and let me go into this, but this is something which I'm sure you've heard about, again, question is why. So everybody knows that a is called a slope and b is called an intersect, right? Intersect. Why? Okay. Why a is a slope? Let's take two different values of argument x is equal to a and x is equal to b. And y is equal to, let's call it b, it's equal a a plus b. And another y, let's say it's q, is equal to a, sorry, this is capital b, b plus b. Now, so we have two values of argument and two values of function. So let's just do this, we don't really do this quite, it's confusing. Let's do the following. Let's compare the increment of the function relative to the increment of the value. So let's just for simplicity assume that a is less than b, these two points. So increment of the function is the difference between p and q, right?  That's an increment of the function. Now if I will divide it to increment of the argument which is b minus a, what happens? Obviously, if you will open these parentheses, it will be minus a lower case a and minus b. b would be, this is plus b, this is minus b, so you can just get rid of it. And you will have a b minus a a, a outside of the parentheses. So it would be a a minus, sorry, a b. So it will be a b minus a a divided by b minus a. Now a, you can factor out, it would be b minus a divided by b minus a. And as a result, you can reduce this, you will have a, it's not right. So that's why the coefficient a is called a slope. Because if you will compare it graphically, let's use the same graph. We don't use the third point. So if you will take two different points on the graph. This is a, this is b, this is p, and this is q.  Now, what we see is the difference between p and q is this, this is q minus b. This is increment of the function. From this value, it grew up to this value. That's the increment of the function. Argument is grew by this. So this is b minus a. So if you divide this into this, you get basically a slope, right? That's why it's called a slope. The steepness of the graph obviously is in this particular coefficient. The greater the coefficient a is, let's say it's positive. And the greater it is, the function would be monotonically increasing. But the greater this ratio is, which is a, the steeper would be the graph. Because the function would grew by a greater degree relative to the increment of the argument. Now if a is negative, then the absolute value actually of the a decides the same thing. Then the function would be decreasing, but the slope, the steepness of the decrease would be the greater if the absolute value of a being negative, the absolute value of a would be greater. Because again, for the same increment of the argument, the function would either grow if a is positive or decrease in value if a is negative by a greater ratio. So that's why a is called a slope. Now, what is b? Well, substituting to this, x equals to 0. Now graphically, if x is equal to 0, it's this distance. Which means that's where the graph intersects the y-axis. And that's why the b is called y-intercept. So this is the value of b. For a positive b, the graph intersects the y-axis above the x-axis. For a negative b, obviously the graph would intercept the y-axis below the x-axis. But in any case, the value of b is actually this particular value, positive or negative. That's why b is called intercept. So y equals ax plus b. A is a slope and b is called a y-intercept. That's it for today. That's all about graphs for linear functions, which I wanted to talk about. There will be some other properties of the linear functions. But that would be the other lecture. Thank you.


Okay, for the warm-up, get a lacrosse ball, you're going to take it, and you're going to pitch it in between your pack area in the wall, and you're going to roll it around for about 20 seconds. And anything that feels a little bit more tender, you're going to stick on that, and you're going to switch sides. And you're going to move on to your lats, and turn the side of your body right here. Roll it around, get all the way up into your armpit. 20 seconds, switch sides, and then the last one is the deep part of your hip. Here on the side, you've got to pinch it between the wall, and you've got to shake which promulgate.


Come on, let's try it then. It goes feet up. Well done, do you break out? Good. Get round. Ah! There you go. Ready? Let's give this one a go. With the game then. Listen carefully. So the whites, okay, you're going to tap that goal. Your offside line is those double red cones down there. The side? Yes. So what does that mean to you there? You're not allowed to score. Okay. So you can go, it's high up to that line there without being offside. The other team, so the greens going that way, your offside line is a half way line. So in your teams, just quickly, can you be the captain for the greens? Okay, and obviously you're going to go that way, aren't you? Yeah? No, that way. All right, that way. Go and talk to your team about how you might play. Okay, off you go. And the whites, you're going to go that way. So that's your offside line. Think about how you might play. Our play from Bas! Play! How big can you make the pitch? Good. Finish! Good! Play from this end! Bas, play! So Nick, Nick, Nick, have a corner. So if you're at a possession, what do you want to try and do? Make it, make it, spread out or make it compact? When you're out of possession. Okay, so are you going to be able to press high at the pitch if that's the offside line? That's what might you do as a first point here. Go and show me. Go, play, play. Good, you're in! Great goal, yes, play! So in your game, because you're halfway lines here, what have you then got in there? Okay, so if he's free and he's running towards you, do you want to come into feet or do you want to spin off? Okay, show me. Play, play. Okay, so just very, very quickly with the game, it's different, isn't it? So one team have got a high line here and one team are playing a bit deeper because of the offside line. That makes sense. Yeah? So Nick, what sort of play have you been doing as a centre forward? Okay, so two things there. So what we're saying, Nick's decided that if he presses high up here, he's leaving like three quarters of the pitch, a massive area. So if Nick plays a bit deeper and counters, what have you then got in here, Nick? Space. Brilliant. So some of your finishing has been like one on one, isn't it? Brilliant, okay.  Okay, so making runs. Is it being a quicker combination play? Yeah. Okay, and we had one goal, didn't we? We went across goal, didn't we? That was a great little finish that we might have worked on earlier. Okay, so you're going to stay in the same teams as it is. Okay, but I just want you to think now about having those conversations together, what are you going to try and do better now to get Nick in front of goal and those 1v1s? Okay, how are you going to play defensively to help you do that?  And this team, no it's fine. If they're playing deeper, like they are, so they're deeper, what have you got to do to get shots off? Brilliant, so a little bit of a combination maybe. And moving the ball slower or quicker? Okay, off you go. Yes, fast play!


Today I've opted to speak on the topic, the political economy of structural transformation has democratically failed African economies. I'm quite sure that not many people are used to hearing me talk about politics, but I think we've gotten to a point in our lives of Africans where we cannot escape the need to talk about the politics of our region and how that affects the development or the fortunes of the region. It's important that we put Africa into the right perspective. It's a region that today is seen by many as having made some very decent progress in the last decade. But not too long ago, 2009, the economists were describing it as a hopeless continent. And not too long after that, in 2011, when some optimism came into the scene, we saw Africa rising. And another two years later, the aspiring Africa. So clearly, the way in which the world sees Africa has changed or is changing. One thing remains, however, even though the narrative may be changing in terms of how African governments are seen by the world, there is also the other side that with every marginal change that you see, there is something else that may be less understood and less positive for the people that live in the region. I've chosen to talk about this and my talk is motivated by three experiences that I've had in the last two decades. The first is my experience with the economic reforms in Ghana, which began in 1983. So after doing it for about nine years, we then opted to replace the military regime that brought in the reforms with an electric government in 1992. So many of us were quite worried about how the transition was going to be made. We watched how in preparation for the first elections under the fourth Republican constitution, government began to spend and spend and spend like there was no tomorrow. And of course, that meant that soon after the elections in 1993, the economy was in complete mess. And the economy that had taken almost a decade to stabilize was in a complete mess. So in 1993, the government organized a meeting with all the donors to see how best we could change the situation. I was lucky to be invited to the meeting and I listened to the minister of finance, explained how donors had forced the government to have elections as a result of the way they had to have elections to legitimize policies and so on, had no choice. And then they were bank vice president at the time, responded. And we didn't ask you to win the elections. We only said have it like we didn't ask you to win. So it was the process of trying to win the election that created a huge deficit that took almost four years to fix. So that was my first experience. African governments having elections and the strong desire to win the elections. And as a result of that, more or less destroying so many gains from almost a decade. But I've watched Ghana do that almost every four years. So it happened in 1996, it happened in 2000 and so on. And the same thing happens. So it actually happened only in Ghana. It happens in almost every African country where there are elections. So you spend a lot of time fixed and stabilizing the economy. And you use a year to destroy it. So that's my first experience. The second one that also motivates this talk came from my first visit ever to Ethiopia. I was invited in 1994 by the Ethiopian Economic Association to share with them my experience as a Ghanian living through the reforms in Ghana. So I gave what I thought was a very nice talk. And in my talk, I spoke about the need for reforms. And it emphasized Lantania reforms. Of course as I spoke, the Prime Minister was there. So I thought he was enjoying himself. So later on when he got up to speak, he said to my hearing there will never be a change in Lantania system so long as I remain Prime Minister. I mean, of course coming from a democratic Ghana, I was wondering what's going on here. How can a Prime Minister say that so long as I remain Prime Minister there's going to be no change. So it gave me an insight into how strong leaders in Africa ruled. It gave me an understanding that there will be no change so long as I, the strong man, remain in power. My third experience which also influences what I'm going to say today. Earlier this year I was in Kigali for the next Einstein forum and I've been to Kigali 10 years earlier and I saw the huge contrast. Kigali has changed so much. It was more beautiful, neat. I saw many more tall buildings and I saw a discipline people behaving like in Helsinki that would cross the road. So I said, what's going on here? I looked at the economic performance data and they showed a lot of promise. This year they expected 6.8% growth, 6.1% last year and before 8.6%. So clearly something was going right in Kigali. Clearly something good was happening there. And of course I had many of the Africans there saying this is what every African leader must do. This is what must happen to an African. This kind of change is what we need. But then someone also said well they may be doing this but they are not democratic. But they've had elections. They had elections not too long ago. But you have to change the constitution for the president to run again for the third time for another 7-year term. So clearly there's something good happening in Rwanda but it's not democratic. What does it mean for understanding of democracy and how democracy influences the way economies are supposed to perform? So these three things encouraged me to think that democracy is not something that you treat lightly. There are aspects of it that may be exciting and there will be other aspects that may be not so exciting. So as an economist let me see how to prove it to that. So that's how if you don't understand anything at all from this lecture you remember my three experiences and I think it will be fine. So basically as we typically would do I will talk about the unchanging structure of Africa's economies and explain why the absence of structural transformation. Then I will talk a little bit about how policies are made in the region and how basically those changes in terms of the way policies made could possibly influence our interest in long-term outcomes. Then I will talk about the new political environment, the environment in which African governments experience pluralism, an experience in which many Africans have a voice in who rules their country and what it means for structural transformation and then I will conclude after that. So the main argument that I will make today is that if economic management efforts of the last several decades have not led to transformation it's not simply a question of democracy and associated practices are good for Africa. It goes beyond that question, that's basically my point. The main argument is African governments have not adapted democracy appropriately for the purpose of building institutions that generate the reforms to support structural transformation. So you can be a democracy but if you don't have democratic institutions if you do only hold elections but you don't have the right institutions the likelihood that you reap the benefits or the dividends from democracy becomes very low. So that's the point. That's if you when governments express interest in long-term development they manage this interest with a short-term framework if you need a budget. So we are looking for immediate outputs. Elections will be coming in another four years so they've got the short results. Are we making the point that in many countries that's the main thing that drives decision making. I will argue that appropriate policy and institutional force for structural transformation must be anchored in long-term development frameworks and institutional structures. You can't pursue long-term goals with short-term strategies and short-term frameworks or you can't use institutions that are designed for a short-term purpose to achieve a long-term aspiration. These are the main points I want to make in them. So in my introduction and I do have a very long paper that I wrote for this I talk about the positive stories. I share the recent growth in Africa that has been good. Africa's performance in the last decade has been very, very good and that's compared to other developing regions around. We're talking about 3.1 percent per capita growth that's not bad for many economies and that's the kind of thing that we talk about. So we talk about the fact that Africa has been seen as an area of promise. We talk about the fact that Africa is generally seen positively a lot more so today than it was 20 years ago and it's not simply growth figures showing gains but greater respect for African institutions. There were many people who have said 20 years ago that every good gain that is reflected in the growth numbers probably is a result of a community price change. Today we know that Africa does have some very good policies that have delivered good results. Of course, I also talk about the not so positive stories. The World Bank has estimated that Africa will be the home to the largest number of extremely poor people by 2030 sorry, it's 2030, not 2013. 2030. Africa will be the home to the largest number of extremely poor people by 2030. That's clearly a big problem apart from being the home of poor people is also a place of a lot of dysfunction. That's also part of the challenges that the African needs to be confronted with. Poverty apart from increase in inequalities is also going to increase. These are the kind of challenges that Africa is talking about. Of course, I introduce in interaction some of the structure debates. Can Africa survive without structure transformation? What are the arguments like the rhetoric type of position and others? Can Africa really move on, continue achieving decent growth rates without changing the structure of its economies? We'll be taking a position that no. And then discuss structural adjustment and after, did we simply learn to survive? There are a number of many African finance ministers who would argue that they've learned to fight fires. A lot of what we do in terms of managing the economy is fighting fires. And we fighting fires since 1983. Are we still going to continue fighting fires? Did we learn something? Yes, we did learn something. We learned how to stabilize our economies. Today, if you look at every typical African economy compared to, let's say, at the time the ARC was being created, every central bank in the region, almost every central bank in the region knows how to stabilize after the elections. So you know that it will take you four years to repair things. It will take you one year to spoil it. So the central bankers have conditioned themselves for it. We know how to deal with it. Similarly, finance ministry officials know how to do good budgets. So what have we learned from that process? We talk about it. And then I talk about leadership and institutions. When Barack Obama came to Ghana, his first trip to Africa, he made mention of the fact that what Africa needs, good institutions, strong institutions, not strongmen. It's one that we test in this case that Africa needs strong institutions and not strongmen. How do strongmen function without strong institutions? And how can strong institutions function without strongmen? How do we define who a strongman is? Is Fokagami a strong man? Probably. There are many other strongmen in the region who may not have achieved the kind of results that Fokagami has achieved. So I spent quite a bit of time on the changing structure of the economy. Here the discussion is about the contribution to GDP growth from agriculture, how this is changing or not changing. We talk about agriculture and employment. We discussed the issue of migration and the pain by rural urban development. We also look at things like the changes in the strength of the industrial and the service sectors in relation to agriculture. And of course there's a bit of discussion about the demographics that you find over there. The important thing is the call for more inclusive growth and how to make this sustainable. We discussed that and we talk about the new interest in structure transformation. You will see that I will mention quite extensively the work that Justin Lin has done. This chart is basically to show that unlike the past when Africa's performance was always below what the other regions of the world were doing, today Africa basically sometimes does better than the rest of the world. That's only migraine worse than the rest of the world. Clearly Africa has learned something about how to manage its growth performance. The bit about this contribution to GDP shows where in other parts of the world the contribution of agriculture is declining over time. In Africa we've seen a migraine decline happen. What's interesting about Africa's case is the fact that when that decline took place or is taking place it's not going to the places where you expect that to go. You don't find people moving from agriculture into industry as manufacturing. What you would discuss is they move from agriculture into informal activities like in the service sector. That's something that we talk about. This chart here basically shows how important agriculture is to the African economy compared to other regions. That's a point that we make quite a bit of in the presentation. Here you see the contribution of agriculture forestry efficient across the different regions. For Africa it's much more important than it is to other parts of the world. Then we look at the contribution of agriculture to employment, total employment. You see how for all of the world agriculture is declining. For Africa it's also declining but remains very high. The rate of decline is not nearly as high as in other parts of the world. We make that point in our paper quite strongly. Again we look at the composition of the contribution of agriculture to industry to total employment. We do make that comparison. Then we discuss the contribution of services to total employment in Africa. What is important is the fact that Africa clearly is missing that middle section the industrial sector. We have seen a shift in total employment from agriculture not as fast as is required but that shift is not benefiting industry. We look into the informal sector. It leads Roderick to talk about the reversals in the transformational growth. It's something that we need to pay attention to. Of course we are talking about how to do that. How do we explain the absence of stronger transformation? It's important largely because many African governments are quite keen to change the narrative. They are keen to change the story about what is happening to different sectors. So they are doing their best to promote industry. Of course they do this through various schemes. They do this through the creation of as-properies zones and provide various incentives for companies to bring in some FDI and so on. Given the kind of results that governments are looking for what have we made to explain this. Is it the lack of infrastructure especially electricity? Is that a matter of wiki institutions? Is it the business environment? So many things have been written about why Africa does not excite industrialists whether from within or from outside. What this chart does is the enormity of the problem with respect to electricity access. Clearly Africa is well behind all the other places with an estimate of 40% of the population but only have access. So rural areas are west of trying to locate industry anywhere in rural Africa becomes a huge problem largely in view of the situation there. Alangel, when these people have done some studies into why it's difficult to do business in Africa they talk about corruption they talk about high cost of power they talk about the non enforcement of contracts they talk about poor security and transport infrastructure as well as policy uncertainty. But policy uncertainty probably used to be a more important problem in the 80s than it is today. That's the position I would take on that. So of course it's a whole theory that expects a lot of convergence following the work of people like Saul and others. We discuss quite extensively in the paper the absence of convergence we talk about how divergence has become the issue and why today we see a growing gap between the developed world and the less developed world. How do we explain that? In those discussions things like the role of the state become important should the African state play a more direct role the kind of role that Justin Lane talks about or should it be a lot more controlled what it does. What kind of institutions do you need to foster convergence? What kind of institutions do you need to strengthen the capacity of African industry to produce a bit more productive? That's the kind of discussion that we see more and more in the literature. Of course here I'm not going to go through the whole of this slide. It was likely for Justin Lane's benefit. I don't know if he's in the room today. Justin here. Okay. I'll show him that I think he writes about and we read them and we critique them also. So this is largely focused on things like what the state should be doing in the area of trying to remove the rigidity that make it difficult for people industry to locate in Africa. Quite extensive. We talk about basically the role that the state should be playing how far should the state go not to go. All of that is discussed in these two slides. One of the points that I try to make in trying to explain the absence of structure transformation is the fact that today there are many things that African governments can do as a result of the reforms that they pursued in the 80s and in the 90s. One important one that I talk about the public financial management system in most countries receives considerable attention. So the way in which the baguette is prepared the link between the baguette and various other things that the government wants to pursue specifically in the short term improve considerably. So we felt a bit of time in the paper about how the baguette processes improved in most African countries to the extent that today there is enough evidence about the quality of the baguette improving as a result of these changes that have taken place. One point that I make in the discussion of the baguette processes is the fact that even though they have improved they have improved considerably in the last two decades. There is very little evidence that they do influence the kinds of decisions that need to be made on when it comes to straka transformation. There is very little link between the baguette and the longer term frameworks that are required for making the changes that we do talk about. So that's a point that we make. Here this chart showing the index of quality of baguetry and financial management. Basically the point here is that for Africa which is the lower one, we've seen some improvement at the same time that for other developing countries we see a worsening of the quality of the baguette. But what is interesting is that it's still worse than in the other places at the point that we make with this chart here. This chart shows how things like transparency and others have improved in Africa the accountability and dealing with corruption and the states being able to talk freely about corruption as a problem. The clear indications that there's more transparency. We talk about the fact in Uganda in South Africa, there's probably a full set of aid baguette documents. There are no baguette documents that are obliged to publish. Uganda seems to be doing very well. I don't know whether Louise has anything to do with that. You never know. Having good central bank and deputy governments is always very important for these kinds of things. They are influenced by the finance ministry maybe showing the Botswana, Kenya, Liberia, Mozambique and Tanzania are publishing quite a few. 6 or 7 out of the 8 that are suspected. Of course they are kind of like Equatorial Guinea that do publish nothing at all. So the important thing is that in many countries the process of doing the baguette have become a lot more transparent. I do receive invitations every time again from the finance ministry in Ghana to sit in meetings to discuss, workshops to discuss the baguette. What is she going and what is she not going? Clearly a lot more transparent. In almost every African country today, you will find radio stations that devote time to discussing the baguette. What goes into the baguette and the query why particular roads are going to be paid for for the baguette and not others. So the issue of transparency and how it is fostered accountability is very important. The extent to which it leads to reduction in corruption is yet to be tested. But clearly if people know more about what is in the baguette, the likelihood of it having an effect. So you are not going to be financing projects that do not exist in the past. There were projects that were always found in the baguette but they never got anywhere. So there is a lot of transparency taking place. So that I moved to having learned from how to do baguettes how is this affecting the way we pursue our term change. That's where I go to the last section of the new political environment planning for structure transformation. Beyond the Washington consensus so beyond what we agreed with the World Bank to do beyond what we agreed with IMF to do, beyond what we agreed with DFID and YIDZ and all those other agencies to do what African countries want. The African Union has set forth the agenda 2063 with the aspiration towards a prosperous Africa based on inclusive growth and sustainable development. Almost every African country that have paid attention to does have a program a medium term program and in that program whether it's the a poverty reduction strategy or something similar whether they are serious about them or not but they always talk about modernizing agriculture. Every African country talks about modernizing agriculture and they also talk about industrialization. They talk about these two things clearly these are long term things that you want to pursue and I've made the point that talking about modernizing agriculture without investing in agriculture is not going to really yield the kind of outcomes that you are looking for The chart on the right clearly shows you the agriculture share of government expenditure by region so we compare Africa to other places what you see here is the fact that agriculture gets from the state is much much less than in other parts of the world Interestingly we have the comprehensive African agriculture development program which commits all African governments to devote at least 10% of their annual national budget to agriculture in terms of the MDEs at the time What is interesting is the fact that only Malawi was able to achieve that target When it comes to industrialization again for agriculture most developed blueprints in Africa have an extra interest in manufacturing and value added production The main thing that they do in this regard is to provide some tax incentives and they provide infrastructure for these EPZs that you find in many different places I do mention the fact in the paper that industrial policy which basically reflects the way the state wants to intervene in markets to allow provide incentive for the functioning of the industrial sector you don't find it anywhere the number of countries that have talked about industrial policy and do have a document that define industrial policy but very seldom do you find the kinds of arguments for particular investments to be made the way that what would anticipate Yesterday I was very privileged to listen to John Pey and his team present the paper on industrialization without smokestacks That's what John and his team were pursuing I agreed with most of the orientation of that paper in terms of looking at other sectors within the economy alongside manufacturing Of course John was that the story about manufacturing got lost It sounded almost like Africa can industrialize with that manufacturing I was surprised that Justin Lin was up in arms The important thing that we want to pursue here is that Africa needs to have clearly stated industrial policy What goes into that industrial policy should be informed country by the states of things in that country the human capital available the challenges that are provided by nature and so on These are things that should be going into industrial policy and I have no difficulty at all supporting things like subsidies I have no difficulty with picking winners The most important thing I was emphasized is knowing how to pick the winners knowing how to pick the right winners and I know that as a result of the our fingers burned in the 1960s and 1970s when we were doing the imports of sushi industrialization everybody has run away from picking winners instead of learning how to pick winners and that's a point that I do make quite a bit of in the paper So I have no difficulty with picking winners so long as we do that properly Now discussions that we will have and economic decision making African countries saw considerable instability, political instability in the 1960s, 1970s, 1980s We talk about the number of kudita that took place in the region and after they went through shakal adjustment the number of kudita that occurred went down considerably So when you talk about that, what did they learn from it they learned from that the need for good governance and that's the kind of thing that the World Bank preached quite extensively in the 90s, good governance the pursuit of good governance led to the elections but today we've seen that many of the elections that were organized were largely only in name were largely only in name we've seen countries like Angola, Cameroon, Ekuchiragini the DRC and Congo all produce elections and election results and nobody really believes them but we do accept them because we have to be nice so we accept these results and we pretend that democracy is taking place and when things go wrong in those countries we blame it on the new democracy that's one of the issues that I talk about my colleague Joab Wadi has written about the number of Democrat democracies that we have in Africa increased considerably after 1989 so that by 2000 a good number of African can be described as democracies so is there a link between Africa becoming more and more democratic, more and more having more and more elections and then the way the economies perform there are a number of people that have written quite extensively about these experiences many of them can be three different scenarios what they call the conflict scenario and then the compatibility scenario and then the skeptical scenario in the conflict scenario elected officials take a short term view about policy making they are always thinking about the next election as I've described to you earlier and so most decisions that are taken will have this in mind I do talk about countries that could easily qualify for this indeed ok let me go to the next topic the compatibility scenario here this is more of the positive relationship between elections and democracy and current performance here the emphasis on pluralism is to have checks and balances and the freedom of press providing safeguards against the system abuse of predatory behavior so what people are looking for is evidence of a positive relationship between the elections or the democratic processes and the economic performance and of course in the last scenario there's no relationship that can be found between democracy and development and the one who have done studies in these Samogulu is one of such and then his work clearly followed by many others shows that there's some positive relationship between having a democracy and current performance we talk about the fact that per capita GDP is about 20% over the past 30 years this translates to zero points increase in annual growth the idea here that democracy is more likely to lead to the protection of the rights of individuals including property rights and so on so the argument about a positive relationship between democracy and the performance is linked to how the rights of individuals are protected and the way that incentive force tests they are making the right economic decisions which will lead to growth my colleague Fosu also has studied this and concluded that countries that have democratic regimes enjoy agriculture productivity and growth of course that's the skeptical view and there are a number of studies that have gone in Africa one of the best known is the way by Kisangani 2006 published in Canada which basically looks at 37 countries and then concludes support the skeptical view there are a number of these what is important in this discussion is the fact that next there are those who see a positive relationship and those who do not I have looking at the performance of very countries come to the position it doesn't really matter whether it's a matter of democracy, fostering development or there being no strong relationship between them this is because most of Africa you will find evidence of all of these sometimes in the same country you will find the authorities playing out let's take a country like Nigeria Nigeria is Nigeria claims to be the largest democracy in Africa the largest democracy has the largest population so the largest democracy in Nigeria does have regular elections every four years do have elections and we've seen elections lead to a change in government so clearly there's something credible about the way they run elections in Nigeria is the way decisions get made linked to the elections sometimes yes other times no I've seen Nigerian governments take very radical decisions a good example would be when Char Saludo decided to consolidate the banking system in Nigeria a very tough decision one that most governments would have run away from effectively reducing the number of banks significantly in a very short period the Nigerian government was able to do it and yet the Nigerian government was able to do much about the oil industry was able to control corruption so corruption gets worse and worse and worse so do you blame corruption in Nigeria on democracy or not it's a very difficult one we saw corruption in Nigeria under the military regime and we've seen corruption in Nigeria under the civilian regime under the elected regime does corruption play any significant role during elections probably not if all the parties are engaged in it so it's very difficult to see the link between democracy and outcomes in Nigeria I take Ghana my own country there's no point talking about my own country so let me talk about Ghana even though it's a risky thing to do you know one of the things I like about Ghana is all I need to do is listen to you for five minutes and I know which party you belong to so I'm quite sure that the Kenyans here after five minutes we know which party I belong to but after the risk I'm sure they will be wrong anyway so Ghana has changed so we enter this phase of election governments every four years that's in 1992 what we call the fourth republic so we changed from Rollins to Kufuwa another party and then from Kufuwa we went to it was Atamels we went to John Muhammad and now with President Kufuwa so we know how to change governments so the presidents know that we know how to change them we know how to sell our votes we know how to draw out of a candidate so if I'm a Ghanian and I see elections coming I know there's a high likelihood that the road in front of my house will be fixed I know that if I need water I don't need to make too much noise I have to simply wait for the next elections and there's a high likelihood that it will be fixed if there's power and indeed everybody who knows very well that supply of power gets very erratic if arrangement that we have there because we can't pay for the production and you know that no matter how many power cuts or load sharing takes place as elections approach they will find a solution to the problem so we know that and because we know that and the governments also know that we sort of come into an arrangement or an understanding that help me and I also help you help me with the infrastructure and help me so when you do that I'll help you to gain power what it means is that come elections promises are made and the current government made quite a number of promises I promised free senior high education I promised every district with a new factory I promised every village with a dam so the people understood that and they liked the idea so they voted for the government what it means that today the government of Ghana has to produce over 200 factories before the next elections I mean how is that going to work and how do you produce these factories without an industrial policy how do you produce when I talk about this in Ghana it's not look that but there's no they feel connected but I know them so I'm not worried so the government of Ghana seriously believes that it can produce more than 200 factories of course I've heard people debate about what type of factory and the people say a factory is a factory but the idea behind promising 200 factories or more is that you won't deal with the unemployment problem that's the whole idea so if you're going to have 200 factories that don't employ anybody they haven't solved the problem so it's not simply an issue of a factory it's a factory you need to have the factories that can produce jobs that's the kind of dilemma so Ghana has learned or politicians in Ghana have learned in my view to make commitments of a long term nature like producing factories or producing dams using short term instruments using short term frameworks that's why we want to build 200 factories but we don't have a policy on industrialization that for me is a good example of the conflict scenario but the same Ghana also knows how to deal with poverty the same Ghana knows how to do social protection the same Ghana knows how to enhance the functioning of the public services today in Ghana what are the most interesting and I think Maxwell is here so he can confirm we do a lot of re-adjustment of the banking system allowing banks to shut down if they are not performing and the likelihood of a run on them is very high allowing so that's commitment that's clear indication that the government knows what to do at the right time but the same government promises 200 factories within 4 years I struggle with that we talk about things like modernization of agriculture apart from South Africa that is trying to do land tenure reform I haven't seen any single African government try in a very serious way to do reform of the land tenure system and yet we know that to modernize agriculture requires considerable infusion of capital today less than 4% of all investment in Africa it goes into agriculture and we change that we are not going to change that by leaving the land tenure system intact something has to be given you've got to make it worth anybody's while to want to invest in agriculture through things like land consolidation how do you do land consolidation if you don't intend to do land tenure in Ghana nobody talks about land tenure reforms because it's a very it's not a nice thing to talk about why because no interest group was to be a loser in that kind of discussion parliament is not going to be the forum for negotiating the interests of groups under land tenure reforms and so we talk about modernization but no land tenure we talk about giving every village a dam and yet we have no policy on irrigation we talk about providing free senior high schools I wouldn't even discuss what should be in the curriculum it is these things that for me reflect the strong the use of inappropriate tools for the long term problems of course whenever I've spoken about the kinds of things that we want to want to provide free senior high schools we want to finance it with the oil rents that's nice it's nice to be able to give everybody free senior high school education using oil rents but we also know that 10 years after these kids leave the schools they'll be unemployed they'll be unemployed 10 years after they've left those schools they'll still be unemployed and so we have a choice we have a choice between giving them the rice skills that they can find jobs with and those rice skills may come from functioning industry that will provide them with the experience they need to be ready for the job market I wouldn't do anything about industry so we are willing to use the oil rents to finance free senior high school education but more ambivalent when it comes to using oil rents to support modernizing agriculture or an industrial development program that's where I have my difficulty how do governments make those choices how do they decide that's the political economy side how do they decide that financing free senior high school is more important of course they know that free senior high school is more popular more families are likely to be interested in the free senior high school than in supporting agriculture or that in supporting the construction of factories so governments have found a way of making these choices and that's the point that I make so that's my story african governments do make choices but the choices that they make don't reflect our long term interests the choices that they make reflect only the short term gains that will be made sometimes for the population and other times for the government I conclude by simply saying that it's important that we think about these kinds of discussions that in our own countries whether we are from Malawi from Zambia, from Tanzania, Uganda we think about it when we make those choices choices about what needs to be done now and what needs to be done in future we will be thinking more and more about the long term we will be thinking about the gains for the entire nation 10 years from now 20 years from now as opposed to what will happen 4 years from now thank you very much


70% of our planet is covered in water. It is the most regenerative food system that we have on Earth. There's zero inputs. We don't require the same amount of water irrigation, fertilizer use, seeds, labor. It literally makes us free food and it's literally the most regenerative but it's been pillaged by big commercial brands and big commercial fisheries that haven't really figured out how to have it balanced food system just like we have problems on land. So I'm constantly trying to educate around the opportunity that the emerging consumer really does care about the food system, kind of this change in mentality that we have that people will pay more and more attention to where their food is coming from and who's making it and how and that there's this kind of huge white space that's been left on the table by some of these bigger brands.


Live from the BuildGram Auditorium in San Francisco, it's theCUBE, covering Pure Storage Accelerate 2018. Brought to you by Pure Storage. Welcome back to theCUBE's coverage of Pure Storage Accelerate 2018. I'm Lisa Martin with Dave Vellante. We're at the BuildGram Civic Auditorium and we are sporting some. You can't see mine because it's chilly. Who are you? Who are you? I'm a symbol. I don't know, I don't know. There's a name for that. I'm formerly known as Prince. Dave and I are here with Rob Lee, the VP and Chief Architect at Pure Storage. Hey, Rob, welcome to theCUBE. Thanks, thanks for having me. You're sporting a lot of gray. We won't make a comment. I know, I don't have a symbol or a T-shirt either. Can't believe you haven't been kicked out. Like if then you just didn't actually eject you, you don't have to fix that. So, you've been at Pure for about five years now. You were one of the founders of Flashblade. Here we are, third annual Accelerate, packed house this morning in the keynote session. What are some of your observations about the growth that you've seen at this company? Well, you know, it's really been amazing. When I joined Pure, we were about 150 employees. I joined as part of the founding team for Flashblade, one of the first two or three people. In fact, my first day on the job was taking monitors out of boxes and setting up desks. Since then, we've obviously grown tremendously from 150 employees to over 2,300. But more importantly, what we've been able to grow in terms of customers, right? So we've went from that tiny size to over, I think, 4,800 customers today. From the Flashblade side of the house, it's been a really, really fun ride. The first couple of years of my time at Pure were spent really heads down building the product, figuring out how do we repeat some of the kind of core philosophies and values that we brought to FlashArray into Flashblade and take that product into new markets. We brought that product out and launched it at our first Accelerate conference three years ago. So that first year was really about getting it out to market, growing that customer base. Last year, you saw us take it into a lot, a lot of more kind of newer and emerging workloads, analytics, AI, so on and so forth. And this past year has really even spent just doubling down on that. And not only building a lot more expertise within the company about understanding where that direction of the market is going, but also translating that experience that we're gathering, working with customers on the leading edge of all of those industries into helping our new and prospective customers figure out how do they deploy those solutions into their environments and be maximally successful. So it's really been a very, very exciting ride. So Rob, you're the resident AI expert inside of Pure, and I'm sure there are many, but you're in the cube now, so we want to unpack that a little bit. AI seems to be this emerging technology that's a horizontal layer of tech that cuts across virtually every industry and every application. But its application seems to be narrow, whether it's a facial recognition or natural language processing, supply chain optimization. So what's Pure's point of view on AI, artificial intelligence, I'm not crazy about the name, I like machine intelligence better personally, but what's your point of view on the AI space and how it will get adopted, maybe some of the barriers to that adoption? Sure, well, so I think, so I share the same distaste for the term, mostly because I think it's overused and it's misused in many ways, right? I think if you look at AI at its heart, it's really about gathering more intelligence and more value from data. Now, more recently, technology advances mostly in compute and algorithms have caused and created an explosion in subsets of AI, particularly machine learning or deep learning, and that's really what's driving a lot of these new applications. And you mentioned a few image recognition, voice recognition, so on and so forth. But really what it is, is it's re-highlighting a focus on the fact that organizations for decades have been gathering and collecting and storing and paying to store volumes and volumes of data, but they haven't been able to get the maximum value out of it. And I think one of the most chilling statistics I've seen is that over 80% of data that's gathered is unstructured data, but if you look at all of that unstructured data, less than 1% is actually analyzed, right? What that means is that 99% of the data that people have been collecting over the last several decades, they haven't been able to extract maximum value out of. And I think what we're seeing is that the recent advances in, again, hardware technology, software technology, algorithms to drive a lot of these deep learning type of applications, even though the applications may be very focused in terms of the types of data they work with, image recognition, object recognition, emotion detection, so on and so forth, it's really bringing the spotlight back across organizations onto how do we get more information out of all of our data, right? And in a lot of cases, conversations that we get into with customers that start out with the glitzy use cases, the object detection demos, when we start peeling into, okay well so what is it, how are you going to deploy this into your organization, how are you going to translate this into better customer outcomes? You know, we're actually finding ways to apply more traditional data analysis techniques to get better and more information out of people's data. And that may be everything from relational databases to big data analytics stacks. And so again, I think the bigger movement here is that recent advances in technology have really re-highlighted the focus on organizations getting more out of their data, of all forms. When you think about the top market cap companies, Amazon, Facebook, Microsoft, at Google, et cetera, they seem to be companies that have mastered or at least are ahead of the pack in terms of machine intelligence. You guys recently conducted a study with MIT. What do you see from that study and in your conversations with customers in terms of the incumbents being able to close that gap? So I think there are a couple of really interesting points that came out of the MIT survey. One is that the prevalence and demand for AI and particularly machine learning applications is both broad-based across all industries, but it's also huge. I think one of the stats that I saw was that over 80% of organizations expect to deploy into production some form of AI or machine learning technology into their companies by 2020. You know, I think the other thing that wasn't in that survey but was in a set of remarks that Andrew Aang actually from Google made was that is that the rapid pace of development in AI research and particularly the algorithm side in terms of different training frameworks and the way that people are working with data, that the rapid advance in that is actually democratizing entry into the AI space. I don't remember the exact quote, but he said something to the effect of, as algorithm research advances, it's easier and easier for new entrants to get into machine learning, to get into data science and make a bigger and bigger impact. And I think that the other thing that we've learned from the large incumbents is that in many cases, and I think actually Google was the one that came out and said this, I said the reason why Google is at the head of the pack, if you will, in terms of data intelligence and machine intelligence, in some respect, they got their lead by having the most advanced algorithms, most advanced software engineers, but they maintain their lead because they have the most data. Basically, the takeaway point there is having a lot of data, Trump's having the best algorithm and we expect that to continue as AI research and algorithms continue to evolve. And so I think it's really, in many ways, it's much more democratized landscape than previous approaches to... And a lot of that makes sense because the incumbents as we use that word, I like that word, they're going to buy AI from technology suppliers and then they're going to apply it to their business. I mean, at the same time, data generally is not at the core of their business. It tends to be either humans or maybe the bottling plant or some other manufacturing assets or whatever it is. So they have to figure out the data model and that study suggested that while they were optimistic about AI, they were struggling with trying to figure out how to apply it, the skill sets, et cetera. Maybe share some of your thoughts on that. Absolutely, I think one of the things that that study really highlighted was that while there was a tremendous excitement and demand from the upper levels of management, the CIO, the kind of C-suite to deploy AI technologies, that there was an increasing and growing disconnect between the policy decision makers, the kind of executive management and the people that are actually doing the work and working with it. And I think that that disconnect with this technology set is, we see it on a day-to-day basis. We see it with customers that we talk to and I think a lot of that disconnect actually comes from poor infrastructure planning. One of the things that we see is that many companies get really excited about the promise of AI technology, the promise of, hey, I could deploy this solution, I could understand my customers better, great, let's go do it.  And one of the things that, I think there was an article in Financial Times that actually looked at hiring and retention for data scientists and what they found was that, what they found was that the lack of infrastructure, the lack of automation was materially contributing to frustration in terms of data scientists being able to do their jobs to the point where even though it's really, really hard to hire data scientists, it's becoming difficult to retain them if you're not giving them, if you're not equipping them with the tools to do their jobs efficiently. And so this is an area where there's a growing disconnect between the decision makers that are saying, hey, we've got to go that way. Their understanding of the tool sets and the automation and the infrastructure required to get there and their staffs and their employees that are actually responsible for getting them there. And this is an area where, as we, one of the exciting parts of my job at Pures, I get to talk to a lot of customers that are on the bleeding edge of implementing these technologies. And one of the things that we get to do is that by working with each of these customers by understanding what works, what doesn't work, we can help kind of bridge that gap. I'll take the bait. So what does that infrastructure for AI look like? I mean, it's kind of self-serving, but describe it. Sure, well, so I think at the heart of it, it's all about simplicity, it's all about removing friction and bottlenecks. There was a Harvard Business Review article a while ago that looked at data science in general, where time is spent, where resources are spent. And they came up with a statistic that said more than 80% of a data scientist's time is spent not doing data science, or it's actually spent preparing data, moving data, copying, doing basic data wrangling data management tasks. And the other 20% is spent complaining about the first 80%. So no, so I think what we see pure helping with, what we see kind of the ideal kind of infrastructure to enable these types of projects is an infrastructure that is simple, easy to work with, easy to manage. But more importantly, you heard Charlie and Kicks during the keynote today talk about data-centric architectures. You heard them talk about the importance of building an architecture, building a practice, building a set of processes around the idea that data is very, very difficult to move, you want to move it as few times as possible, you want to manage it as little as possible. And that really, really applies in a lot of these AI applications, right? To give you a very, very quick example, if you take a look at an AI pipeline to do something like training an object detection system for self-driving cars, that pipeline, that simple sentence may encapsulate 30 or 40 different applications, right? You've got video coming off of video cameras that have to be ingested somewhere, that video has to be cut, downsized, rendered, cut into still images.  If you play this out, right, in most cases there's 30, 40 different applications that are at play here. And without an infrastructure to make it easy to centralize the data management portion of that, you've also potentially got 30 or 40 different data silos. And so, when we look at how to make projects successful, when we look at how do you make infrastructure that helps data science teams spend more time doing data science and less time copying data around, tracking where it is, so on and so forth. You know, that's all part of what we see as a larger data strategy, right? It ends. Oh, sorry, Rob. So one of the customers that was shared on stage this morning, Page AI, how they're leveraging not just pure technology, but also really kind of taking what used to be, and still is for a lot of organizations, an analog process of actually looking at cancer pathology slides and digitizing that and taking it forward. Did you see in this study any leading industries that are maybe better positioned to align the C-suite with the IT needs to take advantage of AI faster? Are there any industries that kind of jumped out in this study as maybe those that are going to be leading edge? So I think the thing that I actually jumped out was that how broad based across industries really the AI applications are. I think if you look at specific types of data sets or specific use cases, right? So if you look at image detection, for example, yes, I think you can drive that into specific industries. I think you're going to see a lot in healthcare, in manufacturing, certainly self-driving cars is a big one, right? I think if you look at natural language processing, right, speech detects, that sort of thing, you know, a lot of customer service, right, that's being put into use in a lot of, you know, automating a lot of chatbots, a lot of customer service, kind of call center type applications. So I think if you look at a particular application, or a particular data set or data type, you can drive that to industries that are likely to lead the charge. But what was interesting to me was if you consider all of the machine learning approaches, all of the AI kind of interest, how broad based across all industries that was? At least I know we're out of time, but we'd be remiss if we didn't ask you what you guys are doing internally. You're not just selling an infrastructure for AI, you're AI practitioners as well. Can you briefly describe what you're doing? Sure, sure. So I think the most interesting application of AI that we've got internally is really the AI engine that powers META, which is our pure one hosted kind of, our pure one offering that helps us predictively and proactively manage customer arrays. We started pure one as a remote support offering since the beginning of pure, since we first shipped FlashArray. And we did it originally to get to the point where we could better understand arrays, the more arrays that we ship in the field, we want the marginal cost of support, the marginal kind of effort, if you will, to understand that array's behavior, to decrease with the number of arrays that we ship. And we want our understanding of the array's behavior of the customer use case of the workload behavior to increase with the number of arrays that we ship. And we started off by using more traditional AI techniques, so basic language processing, basic statistics, so on and so forth. What we've since done is built a machine learning engine behind it so that we can make more intelligent inferences, more intelligent decisions. And so you've seen this come out as in the form of tools that we've released, such as Will It Fit? So we can now take a look at an array and we could say, okay, well, you've got this many workloads, you've got this many VMs sitting on this array and on this volume. What would it look like to put double that? What can you expect in terms of capacity utilization? What can you expect in terms of performance? We can also take that hypothetical kind of hypothesis analysis to different hardware platforms. We can say, hey, you've got this workload running on a X50 today. What would it look like to double that workload and move it to an X70? What would that look like? And again, a lot of those inferences, a lot of, we can do that without exactly tracking and exactly testing that workload because we have a broad based set of data points across our entire fleet. Too complicated for humans to do all that. It really is. Yes, it really is. But generating workload DNA. Work exactly, exactly. And more importantly, and to get to David's point, more importantly, doing it in an automated way so that you don't have to put an army of human beings and army of administrators behind it to calculate it by hand. Well, Rob, thanks so much for stopping by theCUBE and sharing with us what's going on from your perspective.  Thanks for having me. For Dave Vellante, I'm Lisa Martin. You're watching theCUBE. We are live at Pure Storage Accelerate 2018 in San Francisco. Stick around, Dave and I will be right back with our next guest.