From the course: SQL for Statistics Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Computing intercept - PostgreSQL Tutorial
From the course: SQL for Statistics Essential Training
Computing intercept
- [Instructor] We can define a line using a formula that references the y-intercept, or the point that a line crosses the y-axis. We also need the slope, which is sometimes called the rise over the run of the line. Let's look at how to compute the intercept of a linear regression line. For example, let's say we want to make a prediction about the number of employees we'll need to have working to accommodate the number of items we expect to sell. We want to find the intercept of the line where the employees' shifts is on the y-axis, and the units sold is on the x-axis. We can do that with this command. We'll use select, and then we'll call the function regression intercept, and regression is shortened to R-E-G-R, and then we specify the two axes, or in this case, the columns. In our case it's going to be employee shifts and units sold, and we're going to select this from store sales. So, 2.41 is approximately the intercept on the y axis. Now, if we wanted to predict the number of items…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.