From the course: PostgreSQL: Advanced Queries

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Find the standard deviation and variance of a dataset

Find the standard deviation and variance of a dataset - PostgreSQL Tutorial

From the course: PostgreSQL: Advanced Queries

Find the standard deviation and variance of a dataset

- [Instructor] In statistical analysis, scientific measurements, two additional aggregate functions may be valuable. The standard deviation and variance of a set of data, both describe the spread or the dispersion of values from the norm. Now, these types of statistical computations aren't typically used with retail data. So in order to demonstrate, I want to load in another dataset into the PostgreSQL database. In the chapter one folder of the exercise files, you'll find a file called people_heights.txt. Copy of the text into a new query window like I have here. And you'll see that it creates a table and it inserts a number of data rows into that table. Execute the script. And it'll create that table inside of the public schema. And it'll add 400 measurements of people's heights, accompanied by their name, and biological gender. Now, we have a good set of data values to evaluate with the standard deviation and the…

Contents