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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT