 In this video, I'm going to go over the one line linear regression command that essentially does everything that that linear regression solution just did, but in a single line. And so I'm going to call this variable output. The command here is stats then regress with the sci-pi stats linked here. And so we just say stats dot Lynn regress. We give it our first variable. We give it our second variable. And then we can just print the output. Oops. And so the output includes several parts. So we've got slope intercept our value p value standard error on the slope standard error on the intercept. And so there's lots of variables here so we rarely want all of them. In particular, we're interested here in the slope, which is just output dot slope. And the intercept, which is just output dot intercept. So we can run this. And so we can see here, our slope and our intercept values. And if we look up here, they are exactly the same. Hide some cells. So we can sort of just barely there. We can see that better. So here is our manual output. Here is our automatic one line output. And we can see that they're the exact same number. So this is something that, you know, uses that linear algebra solution comes the exact same answer, but is a lot quicker to implement for us. And then we can also use those outputs, since they've been stored very nicely in this output function, we can use those to make a basic prediction. So let's say we want to predict the nuclear power for a summer in which we had 475 drowning deaths. So we call that x new. Our prediction, we always call y hat. So this is not the observed data wise, but is the predicted version of that data, why hat. And we can say output dot slope times x new, plus output dot intercept. So this is just our equation of a line, y equals MX plus B. And then we can print the predicted nuclear power generation. It is in megawatts. We can run that. We can see that the predicted megawatt generation is 762 megawatts if there were 475 drowning deaths. And this is something we could have done with the manual linear regression as well. Just change out this output slope to this first beta value and intercept to the second beta value. But for the remainder of this lesson, we'll be focusing on these one line implementations of linear regressions, which, as I said, are a little bit faster to run.