In this video, Kathryn demonstrates Python's statistics module. Learn how to use this module to compute the mean, mode, median, and standard deviation from a set of values.
- The statistics module allows us…to calculate common statistics…like the mean, mode, standard deviation, et cetera.…But it also allows us to do some more…complicated things as well.…So to start off,…we'll go, import statistics,…to import this module.…And we're going to create some data.…So we're going to start off with agesData as our variable.…And this is going to contain…the ages of people at a given summer camp.…So say the employees at this summer camp want to know…the demographics of who attends.…
Well first you have to have the data.…And so say we have…10, 13, 14, these are just some ages.…I'm putting an 11, 10, 11, 10, 15.…But before we jump in on how we use this module,…let's review some statistics.…So here are some statistic definitions.…We have the mean, median, and mode.…So forget about the code for a minute,…and think about this data.…Say we have 2, 2, 3,…standing for how many cookies each person has.…
We can use statistical methods…to get more information about this data.…And this is where mean, median, mode, come in.…
- Working with logical and comparison operators
- Getting a list of numbers with the range() and list() functions
- Using mathematical functions such as round(), abs(), and pow()
- Calculating a given input's length
- Importing and using the math module
- Reading a user's command-line arguments
- Getting the current time
- Formatting dates and times with datetime
- Creating a timer
- Using urllib to get content from the Internet
- Using the JSON module to decode content
Skill Level Intermediate
Learning the Standard PHP Librarywith David Powers3h 24m Intermediate
1. Python: What's Built-In?
2. Python: Math
3. Python: Input/Output
4. Python: Date & Time, HTML Parsing, and HTTP
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.