statistics.py: Write a program that reads a list of integers from the user, until they enter -12345 (the -12345 should not be considered part of the list). Then print the mean, median, and standard deviation of the list. The mean is the average of the numbers. The median is the “middle” value if n is odd, or the average of the two “middle” values if n is even. The standard deviation is the average amount of variability For example: $ python3 statistics.py 15 4 10 2 -12345 mean: 7.75 median: 7 standard deviation: 5.909032633745278

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

statistics.py: Write a program that reads a list of integers from the user, until they enter -12345 (the -12345 should not be considered part of the list). Then print the mean, median, and standard deviation of the list.

The mean is the average of the numbers. The median is the “middle” value if n is odd, or the average of the two “middle” values if n is even. The standard deviation is the average amount of variability

For example:

$ python3 statistics.py
15
4
10
2
-12345
mean: 7.75
median: 7
standard deviation: 5.909032633745278

Expert Solution
Step 1

Introduction

Python provides a wide range of libraries and tools that are specifically designed for working with data and statistical analysis. Among them is the statsmodels library that provides powerful tools for statistical analysis and modeling. It contains a wide range of features, including descriptive statistics, t-tests, regression models, and time series analysis. The SciPy library also offers a range of statistics related functions, including the scipy.stats module which contains a variety of probability distributions and statistical functions. 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education