https://github.com/qtle3/stats
This repository contains two Python scripts, `stats_calculations.py` and `stats_user.py`, which provide a comprehensive toolset for performing statistical calculations. The program allows users to compute various statistical metrics such as mean, median, mode, variance, and standard deviation, all through a user-friendly command-line interface.
https://github.com/qtle3/stats
alogrithm error-handling modular-design python-functions quick-select statistical-analysis user-input
Last synced: about 1 month ago
JSON representation
This repository contains two Python scripts, `stats_calculations.py` and `stats_user.py`, which provide a comprehensive toolset for performing statistical calculations. The program allows users to compute various statistical metrics such as mean, median, mode, variance, and standard deviation, all through a user-friendly command-line interface.
- Host: GitHub
- URL: https://github.com/qtle3/stats
- Owner: qtle3
- Created: 2024-08-02T03:48:39.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-02T04:43:39.000Z (10 months ago)
- Last Synced: 2025-02-14T16:01:52.660Z (3 months ago)
- Topics: alogrithm, error-handling, modular-design, python-functions, quick-select, statistical-analysis, user-input
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Scripts
### 1. `stats_calculations.py`
- **Purpose:** Provides functions to perform statistical calculations.
- **Key Functions:**
- `calculate_mean()`: Computes the average of a list of numbers.
- `calculate_median()`: Determines the middle value in a sorted list.
- `calculate_mode()`: Finds the most frequent value in a list.
- `calculate_variance()`: Measures the dispersion of a set of numbers.
- `calculate_standard_deviation()`: Calculates the amount of variation in a dataset.
- `calculate_quartiles()`: Computes the quartiles of a dataset.
- `get_numbers_from_user()`: Handles user input for numbers.
### 2. `stats_user.py`- **Purpose:** Provides a command-line interface (CLI) for interacting with statistical functions.
- **Features:**
- Interactive menu for selecting statistical operations.
- Data visualization using histograms.
- Allows for repeated calculations without restarting the program.
## Key Concepts Covered- **Statistical Analysis:** Understand and compute basic statistical measures.
- **Python Functions:** Modularize code using functions for different calculations.
- **Error Handling:** Manage user input and handle exceptions gracefully.
- It also includes a `quick_select` algorithm for efficient median calculation.