python-stats


Namepython-stats JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/RanaEhtashamAli/py-stats
SummaryA pure-Python module providing comprehensive statistics functions
upload_time2025-08-02 23:02:03
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.7
licenseNone
keywords statistics math data-analysis scientific-calculator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-stats

[![PyPI version](https://badge.fury.io/py/python-stats.svg)](https://badge.fury.io/py/python-stats)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Status: Complete](https://img.shields.io/badge/status-complete-brightgreen.svg)](https://github.com/RanaEhtashamAli/py-stats)
[![Functions: 60+](https://img.shields.io/badge/functions-60+-orange.svg)](https://github.com/RanaEhtashamAli/py-stats)
[![Educational](https://img.shields.io/badge/educational-focus-blue.svg)](https://github.com/RanaEhtashamAli/py-stats)

A pure-Python module providing comprehensive statistics functions similar to those found on scientific calculators. This package offers over 60 statistics functions for both univariate and multivariate analysis.

**Educational Focus**: Perfect for learning statistics, programming, and data science with clear mathematical implementations and comprehensive examples.

## 📊 Project Status

✅ **Complete and Ready for Use**

- **Version**: 2.0.0
- **Functions**: 60+ statistical functions implemented
- **Testing**: 100% test coverage with comprehensive unit tests
- **Documentation**: Complete with examples and mathematical formulas
- **Educational Value**: High-quality learning resource
- **License**: MIT License (permissive and open)
- **Repository**: [GitHub](https://github.com/RanaEhtashamAli/py-stats)

## 🚀 Quick Links

- **📦 PyPI Package**: [python-stats on PyPI](https://pypi.org/project/python-stats/)
- **🐙 GitHub Repository**: [RanaEhtashamAli/py-stats](https://github.com/RanaEhtashamAli/py-stats)
- **📖 Documentation**: [README](https://github.com/RanaEhtashamAli/py-stats#readme)
- **🐛 Issues**: [GitHub Issues](https://github.com/RanaEhtashamAli/py-stats/issues)
- **💬 Discussions**: [GitHub Discussions](https://github.com/RanaEhtashamAli/py-stats/discussions)

## 📋 Table of Contents

- [Project Status](#-project-status)
- [Quick Links](#-quick-links)
- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Documentation](#documentation)
- [Package Structure](#-package-structure)
- [Requirements](#requirements)
- [Testing](#testing)
- [Performance Notes](#performance-notes)
- [Educational Focus](#-educational-focus)
- [License](#license)
- [Contributing](#contributing)
- [Acknowledgments](#-acknowledgments)
- [Support](#-support)

## Features

### Univariate Statistics
- **Means**: arithmetic, harmonic, geometric, and quadratic means
- **Central Tendency**: median, mode, midrange, trimean
- **Angular Statistics**: mean of angular quantities
- **Averages**: running and weighted averages
- **Quantiles**: quartiles, hinges, and quantiles
- **Dispersion**: variance and standard deviation (sample and population)
- **Deviation Measures**: average deviation and median average deviation (MAD)
- **Shape**: skewness and kurtosis
- **Error**: standard error of the mean
- **Robust Statistics**: winsorized mean, trimmed mean, interquartile range, range, coefficient of variation
- **Order Statistics**: percentile rank, deciles, percentiles
- **Shape and Distribution**: coefficient of skewness, coefficient of kurtosis, normality test
- **Central Tendency Alternatives**: winsorized median, midhinge
- **Probability and Distribution**: z-score, t-score, percentile from z-score, confidence intervals
- **Time Series**: moving average, exponential smoothing, seasonal decomposition

### Multivariate Statistics
- **Correlation**: Pearson's, Spearman's, Kendall's tau, Q-correlation, point-biserial correlation
- **Covariance**: sample and population covariance
- **Regression**: simple linear, multiple linear, polynomial regression, residual analysis
- **Sums**: Sxx, Syy, and Sxy calculations
- **Association Measures**: chi-square test, Cramer's V, contingency coefficient

## Installation

### From PyPI (Recommended)
```bash
pip install python-stats
```

### From GitHub
```bash
pip install git+https://github.com/RanaEhtashamAli/py-stats.git
```

### Development Installation
```bash
git clone https://github.com/RanaEhtashamAli/py-stats.git
cd py-stats
pip install -e .
```

## Quick Start

```python
import py_stats as ps

# Basic statistics
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(f"Mean: {ps.arithmetic_mean(data)}")
print(f"Median: {ps.median(data)}")
print(f"Standard Deviation: {ps.standard_deviation(data)}")

# Robust statistics
print(f"IQR: {ps.interquartile_range(data)}")
print(f"Coefficient of Variation: {ps.coefficient_of_variation(data)}")

# Multivariate analysis
x = [1, 2, 3, 4, 5]
y = [2, 4, 5, 4, 5]
print(f"Pearson Correlation: {ps.pearson_correlation(x, y)}")
print(f"Spearman Correlation: {ps.spearman_correlation(x, y)}")

# Regression
slope, intercept, r_squared = ps.linear_regression(x, y)
print(f"Regression: y = {slope:.2f}x + {intercept:.2f}, R² = {r_squared:.3f}")
```

## Documentation

### Univariate Functions

#### Means
- `arithmetic_mean(data)`: Arithmetic mean
- `harmonic_mean(data)`: Harmonic mean
- `geometric_mean(data)`: Geometric mean
- `quadratic_mean(data)`: Quadratic mean (RMS)

#### Central Tendency
- `median(data)`: Median
- `mode(data)`: Mode
- `midrange(data)`: Midrange
- `trimean(data)`: Trimean

#### Quantiles
- `quartiles(data)`: First, second, and third quartiles
- `hinges(data)`: Lower and upper hinges
- `quantile(data, q)`: Quantile at specified probability

#### Dispersion
- `variance(data, population=False)`: Variance (sample or population)
- `standard_deviation(data, population=False)`: Standard deviation
- `average_deviation(data)`: Average absolute deviation
- `median_absolute_deviation(data)`: Median absolute deviation (MAD)

#### Shape
- `skewness(data)`: Skewness coefficient
- `kurtosis(data)`: Kurtosis coefficient

#### Robust Statistics
- `winsorized_mean(data, percent=10.0)`: Winsorized mean
- `trimmed_mean(data, percent=10.0)`: Trimmed mean
- `interquartile_range(data)`: Interquartile range (IQR)
- `range_value(data)`: Range (max - min)
- `coefficient_of_variation(data)`: Coefficient of variation

#### Order Statistics
- `percentile_rank(data, value)`: Percentile rank of a value
- `deciles(data)`: All deciles (10th, 20th, ..., 90th percentiles)
- `percentile(data, p)`: pth percentile (0-100)

#### Shape and Distribution
- `coefficient_of_skewness(data)`: Standardized skewness
- `coefficient_of_kurtosis(data)`: Standardized kurtosis
- `simple_normality_test(data)`: Basic normality test

#### Central Tendency Alternatives
- `winsorized_median(data, percent=10.0)`: Winsorized median
- `midhinge(data)`: Midhinge

#### Probability and Distribution
- `z_score(data, value)`: Z-score of a value
- `t_score(data, value)`: T-score of a value
- `percentile_from_z_score(z)`: Percentile from z-score
- `confidence_interval_mean(data, confidence=0.95)`: Confidence interval for mean
- `confidence_interval_proportion(successes, total, confidence=0.95)`: Confidence interval for proportion

#### Time Series
- `moving_average(data, window=3)`: Simple moving average
- `exponential_smoothing(data, alpha=0.3)`: Exponential smoothing
- `seasonal_decomposition_simple(data, period=4)`: Simple seasonal decomposition

#### Specialized
- `angular_mean(data, degrees=True)`: Mean of angular quantities
- `running_average(data, window=3)`: Running average
- `weighted_average(data, weights)`: Weighted average
- `standard_error_mean(data)`: Standard error of the mean

### Multivariate Functions

#### Correlation
- `pearson_correlation(x, y)`: Pearson's correlation coefficient
- `spearman_correlation(x, y)`: Spearman's rank correlation
- `kendall_tau(x, y)`: Kendall's tau correlation
- `q_correlation(x, y)`: Q-correlation coefficient
- `point_biserial_correlation(x, y)`: Point-biserial correlation

#### Covariance
- `covariance(x, y, population=False)`: Covariance (sample or population)

#### Regression
- `linear_regression(x, y)`: Simple linear regression
- `multiple_linear_regression(x_vars, y)`: Multiple linear regression
- `polynomial_regression(x, y, degree=2)`: Polynomial regression
- `residual_analysis(x, y)`: Residual analysis

#### Sums
- `sum_xx(x)`: Sum of squared deviations (Sxx)
- `sum_yy(y)`: Sum of squared deviations (Syy)
- `sum_xy(x, y)`: Sum of cross-products (Sxy)

#### Association Measures
- `chi_square_test(observed)`: Chi-square test of independence
- `cramers_v(observed)`: Cramer's V association measure
- `contingency_coefficient(observed)`: Contingency coefficient

## 📁 Package Structure

```
py-stats/
├── py_stats/
│   ├── __init__.py          # Package initialization (v2.0.0)
│   ├── univariate.py        # 40+ univariate functions
│   └── multivariate.py      # 20+ multivariate functions
├── tests/
│   ├── test_univariate.py   # Comprehensive univariate tests
│   └── test_multivariate.py # Comprehensive multivariate tests
├── examples/
│   ├── basic_usage.py       # Basic usage examples
│   └── advanced_usage.py    # Advanced usage examples
├── setup.py                 # Package configuration
├── pyproject.toml          # Modern packaging config
├── README.md               # This documentation
├── LICENSE                 # MIT License
└── .gitignore             # Git ignore patterns
```

## Requirements

- Python 3.7 or higher
- NumPy 1.19.0 or higher

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

### License Summary

The MIT License is a permissive license that allows you to:
- ✅ Use the software for any purpose
- ✅ Modify the software
- ✅ Distribute the software
- ✅ Distribute modified versions
- ✅ Use it commercially

The only requirement is that the original license and copyright notice must be included in any substantial portions of the software.

## Contributing

We welcome contributions to make python-stats even better! Here's how you can help:

### 🤝 How to Contribute

1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Make your changes** and add tests for new functionality
4. **Run the tests**: `python -m pytest tests/ -v`
5. **Commit your changes**: `git commit -m 'Add amazing feature'`
6. **Push to the branch**: `git push origin feature/amazing-feature`
7. **Open a Pull Request**

### 📋 Contribution Guidelines

- **Code Style**: Follow PEP 8 and use Black for formatting
- **Documentation**: Add docstrings for new functions
- **Tests**: Include tests for new functionality
- **Educational Focus**: Keep the educational value in mind
- **Mathematical Accuracy**: Ensure statistical formulas are correct

### 🐛 Reporting Issues

If you find a bug or have a feature request, please open an issue on GitHub with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Python version and environment details

## Testing

Run the test suite:

```bash
python -m pytest tests/ -v
```

## Performance Notes

This package is designed for educational purposes and small to medium-sized datasets. For large-scale data analysis, consider using NumPy, SciPy, or Pandas for better performance.

## 🎓 Educational Focus

This package is specifically designed for educational purposes and serves as an excellent resource for:

### 📚 Learning Applications
- **Statistics Courses**: Covers undergraduate statistics curriculum
- **Programming Education**: Demonstrates Python package development
- **Research Methods**: Practical statistical analysis tools
- **Data Science**: Foundation for more advanced analysis

### 🎯 Key Educational Features
- **Mathematical Transparency**: Clear implementation of statistical formulas
- **Comprehensive Examples**: Step-by-step usage demonstrations
- **Pure Python**: Easy to understand and modify
- **Well-Documented**: Detailed docstrings with mathematical explanations
- **Test-Driven**: All functions thoroughly tested for accuracy

### 💡 Use Cases
- **Classroom Teaching**: Interactive statistics demonstrations
- **Self-Learning**: Understanding statistical concepts through code
- **Research Projects**: Small-scale statistical analysis
- **Code Review**: Learning Python best practices
- **Portfolio Projects**: Showcasing statistical programming skills

The code is well-documented with clear mathematical formulas and examples, making it ideal for educational use.

## 🙏 Acknowledgments

- **NumPy**: For efficient numerical computations
- **Scientific Community**: For statistical formulas and methodologies
- **Open Source Community**: For inspiration and best practices
- **Educational Institutions**: For feedback and testing

## 📞 Support

If you have questions, suggestions, or need help:

- **Issues**: [GitHub Issues](https://github.com/RanaEhtashamAli/py-stats/issues)
- **Discussions**: [GitHub Discussions](https://github.com/RanaEhtashamAli/py-stats/discussions)
- **Documentation**: This README and function docstrings
- **Examples**: Check the `examples/` directory for usage demonstrations

---

**Made with ❤️ for the educational community** 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RanaEhtashamAli/py-stats",
    "name": "python-stats",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Your Name <your.email@example.com>",
    "keywords": "statistics, math, data-analysis, scientific-calculator",
    "author": "Your Name",
    "author_email": "Your Name <your.email@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/3b/b8/4c58f10dbc9dd7f05276000ac3dd009bd3396b97dfcb33fe3e9000beb782/python_stats-1.0.0.tar.gz",
    "platform": null,
    "description": "# py-stats\r\n\r\n[![PyPI version](https://badge.fury.io/py/python-stats.svg)](https://badge.fury.io/py/python-stats)\r\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\r\n[![Status: Complete](https://img.shields.io/badge/status-complete-brightgreen.svg)](https://github.com/RanaEhtashamAli/py-stats)\r\n[![Functions: 60+](https://img.shields.io/badge/functions-60+-orange.svg)](https://github.com/RanaEhtashamAli/py-stats)\r\n[![Educational](https://img.shields.io/badge/educational-focus-blue.svg)](https://github.com/RanaEhtashamAli/py-stats)\r\n\r\nA pure-Python module providing comprehensive statistics functions similar to those found on scientific calculators. This package offers over 60 statistics functions for both univariate and multivariate analysis.\r\n\r\n**Educational Focus**: Perfect for learning statistics, programming, and data science with clear mathematical implementations and comprehensive examples.\r\n\r\n## \ud83d\udcca Project Status\r\n\r\n\u2705 **Complete and Ready for Use**\r\n\r\n- **Version**: 2.0.0\r\n- **Functions**: 60+ statistical functions implemented\r\n- **Testing**: 100% test coverage with comprehensive unit tests\r\n- **Documentation**: Complete with examples and mathematical formulas\r\n- **Educational Value**: High-quality learning resource\r\n- **License**: MIT License (permissive and open)\r\n- **Repository**: [GitHub](https://github.com/RanaEhtashamAli/py-stats)\r\n\r\n## \ud83d\ude80 Quick Links\r\n\r\n- **\ud83d\udce6 PyPI Package**: [python-stats on PyPI](https://pypi.org/project/python-stats/)\r\n- **\ud83d\udc19 GitHub Repository**: [RanaEhtashamAli/py-stats](https://github.com/RanaEhtashamAli/py-stats)\r\n- **\ud83d\udcd6 Documentation**: [README](https://github.com/RanaEhtashamAli/py-stats#readme)\r\n- **\ud83d\udc1b Issues**: [GitHub Issues](https://github.com/RanaEhtashamAli/py-stats/issues)\r\n- **\ud83d\udcac Discussions**: [GitHub Discussions](https://github.com/RanaEhtashamAli/py-stats/discussions)\r\n\r\n## \ud83d\udccb Table of Contents\r\n\r\n- [Project Status](#-project-status)\r\n- [Quick Links](#-quick-links)\r\n- [Features](#features)\r\n- [Installation](#installation)\r\n- [Quick Start](#quick-start)\r\n- [Documentation](#documentation)\r\n- [Package Structure](#-package-structure)\r\n- [Requirements](#requirements)\r\n- [Testing](#testing)\r\n- [Performance Notes](#performance-notes)\r\n- [Educational Focus](#-educational-focus)\r\n- [License](#license)\r\n- [Contributing](#contributing)\r\n- [Acknowledgments](#-acknowledgments)\r\n- [Support](#-support)\r\n\r\n## Features\r\n\r\n### Univariate Statistics\r\n- **Means**: arithmetic, harmonic, geometric, and quadratic means\r\n- **Central Tendency**: median, mode, midrange, trimean\r\n- **Angular Statistics**: mean of angular quantities\r\n- **Averages**: running and weighted averages\r\n- **Quantiles**: quartiles, hinges, and quantiles\r\n- **Dispersion**: variance and standard deviation (sample and population)\r\n- **Deviation Measures**: average deviation and median average deviation (MAD)\r\n- **Shape**: skewness and kurtosis\r\n- **Error**: standard error of the mean\r\n- **Robust Statistics**: winsorized mean, trimmed mean, interquartile range, range, coefficient of variation\r\n- **Order Statistics**: percentile rank, deciles, percentiles\r\n- **Shape and Distribution**: coefficient of skewness, coefficient of kurtosis, normality test\r\n- **Central Tendency Alternatives**: winsorized median, midhinge\r\n- **Probability and Distribution**: z-score, t-score, percentile from z-score, confidence intervals\r\n- **Time Series**: moving average, exponential smoothing, seasonal decomposition\r\n\r\n### Multivariate Statistics\r\n- **Correlation**: Pearson's, Spearman's, Kendall's tau, Q-correlation, point-biserial correlation\r\n- **Covariance**: sample and population covariance\r\n- **Regression**: simple linear, multiple linear, polynomial regression, residual analysis\r\n- **Sums**: Sxx, Syy, and Sxy calculations\r\n- **Association Measures**: chi-square test, Cramer's V, contingency coefficient\r\n\r\n## Installation\r\n\r\n### From PyPI (Recommended)\r\n```bash\r\npip install python-stats\r\n```\r\n\r\n### From GitHub\r\n```bash\r\npip install git+https://github.com/RanaEhtashamAli/py-stats.git\r\n```\r\n\r\n### Development Installation\r\n```bash\r\ngit clone https://github.com/RanaEhtashamAli/py-stats.git\r\ncd py-stats\r\npip install -e .\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\nimport py_stats as ps\r\n\r\n# Basic statistics\r\ndata = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\r\nprint(f\"Mean: {ps.arithmetic_mean(data)}\")\r\nprint(f\"Median: {ps.median(data)}\")\r\nprint(f\"Standard Deviation: {ps.standard_deviation(data)}\")\r\n\r\n# Robust statistics\r\nprint(f\"IQR: {ps.interquartile_range(data)}\")\r\nprint(f\"Coefficient of Variation: {ps.coefficient_of_variation(data)}\")\r\n\r\n# Multivariate analysis\r\nx = [1, 2, 3, 4, 5]\r\ny = [2, 4, 5, 4, 5]\r\nprint(f\"Pearson Correlation: {ps.pearson_correlation(x, y)}\")\r\nprint(f\"Spearman Correlation: {ps.spearman_correlation(x, y)}\")\r\n\r\n# Regression\r\nslope, intercept, r_squared = ps.linear_regression(x, y)\r\nprint(f\"Regression: y = {slope:.2f}x + {intercept:.2f}, R\u00b2 = {r_squared:.3f}\")\r\n```\r\n\r\n## Documentation\r\n\r\n### Univariate Functions\r\n\r\n#### Means\r\n- `arithmetic_mean(data)`: Arithmetic mean\r\n- `harmonic_mean(data)`: Harmonic mean\r\n- `geometric_mean(data)`: Geometric mean\r\n- `quadratic_mean(data)`: Quadratic mean (RMS)\r\n\r\n#### Central Tendency\r\n- `median(data)`: Median\r\n- `mode(data)`: Mode\r\n- `midrange(data)`: Midrange\r\n- `trimean(data)`: Trimean\r\n\r\n#### Quantiles\r\n- `quartiles(data)`: First, second, and third quartiles\r\n- `hinges(data)`: Lower and upper hinges\r\n- `quantile(data, q)`: Quantile at specified probability\r\n\r\n#### Dispersion\r\n- `variance(data, population=False)`: Variance (sample or population)\r\n- `standard_deviation(data, population=False)`: Standard deviation\r\n- `average_deviation(data)`: Average absolute deviation\r\n- `median_absolute_deviation(data)`: Median absolute deviation (MAD)\r\n\r\n#### Shape\r\n- `skewness(data)`: Skewness coefficient\r\n- `kurtosis(data)`: Kurtosis coefficient\r\n\r\n#### Robust Statistics\r\n- `winsorized_mean(data, percent=10.0)`: Winsorized mean\r\n- `trimmed_mean(data, percent=10.0)`: Trimmed mean\r\n- `interquartile_range(data)`: Interquartile range (IQR)\r\n- `range_value(data)`: Range (max - min)\r\n- `coefficient_of_variation(data)`: Coefficient of variation\r\n\r\n#### Order Statistics\r\n- `percentile_rank(data, value)`: Percentile rank of a value\r\n- `deciles(data)`: All deciles (10th, 20th, ..., 90th percentiles)\r\n- `percentile(data, p)`: pth percentile (0-100)\r\n\r\n#### Shape and Distribution\r\n- `coefficient_of_skewness(data)`: Standardized skewness\r\n- `coefficient_of_kurtosis(data)`: Standardized kurtosis\r\n- `simple_normality_test(data)`: Basic normality test\r\n\r\n#### Central Tendency Alternatives\r\n- `winsorized_median(data, percent=10.0)`: Winsorized median\r\n- `midhinge(data)`: Midhinge\r\n\r\n#### Probability and Distribution\r\n- `z_score(data, value)`: Z-score of a value\r\n- `t_score(data, value)`: T-score of a value\r\n- `percentile_from_z_score(z)`: Percentile from z-score\r\n- `confidence_interval_mean(data, confidence=0.95)`: Confidence interval for mean\r\n- `confidence_interval_proportion(successes, total, confidence=0.95)`: Confidence interval for proportion\r\n\r\n#### Time Series\r\n- `moving_average(data, window=3)`: Simple moving average\r\n- `exponential_smoothing(data, alpha=0.3)`: Exponential smoothing\r\n- `seasonal_decomposition_simple(data, period=4)`: Simple seasonal decomposition\r\n\r\n#### Specialized\r\n- `angular_mean(data, degrees=True)`: Mean of angular quantities\r\n- `running_average(data, window=3)`: Running average\r\n- `weighted_average(data, weights)`: Weighted average\r\n- `standard_error_mean(data)`: Standard error of the mean\r\n\r\n### Multivariate Functions\r\n\r\n#### Correlation\r\n- `pearson_correlation(x, y)`: Pearson's correlation coefficient\r\n- `spearman_correlation(x, y)`: Spearman's rank correlation\r\n- `kendall_tau(x, y)`: Kendall's tau correlation\r\n- `q_correlation(x, y)`: Q-correlation coefficient\r\n- `point_biserial_correlation(x, y)`: Point-biserial correlation\r\n\r\n#### Covariance\r\n- `covariance(x, y, population=False)`: Covariance (sample or population)\r\n\r\n#### Regression\r\n- `linear_regression(x, y)`: Simple linear regression\r\n- `multiple_linear_regression(x_vars, y)`: Multiple linear regression\r\n- `polynomial_regression(x, y, degree=2)`: Polynomial regression\r\n- `residual_analysis(x, y)`: Residual analysis\r\n\r\n#### Sums\r\n- `sum_xx(x)`: Sum of squared deviations (Sxx)\r\n- `sum_yy(y)`: Sum of squared deviations (Syy)\r\n- `sum_xy(x, y)`: Sum of cross-products (Sxy)\r\n\r\n#### Association Measures\r\n- `chi_square_test(observed)`: Chi-square test of independence\r\n- `cramers_v(observed)`: Cramer's V association measure\r\n- `contingency_coefficient(observed)`: Contingency coefficient\r\n\r\n## \ud83d\udcc1 Package Structure\r\n\r\n```\r\npy-stats/\r\n\u251c\u2500\u2500 py_stats/\r\n\u2502   \u251c\u2500\u2500 __init__.py          # Package initialization (v2.0.0)\r\n\u2502   \u251c\u2500\u2500 univariate.py        # 40+ univariate functions\r\n\u2502   \u2514\u2500\u2500 multivariate.py      # 20+ multivariate functions\r\n\u251c\u2500\u2500 tests/\r\n\u2502   \u251c\u2500\u2500 test_univariate.py   # Comprehensive univariate tests\r\n\u2502   \u2514\u2500\u2500 test_multivariate.py # Comprehensive multivariate tests\r\n\u251c\u2500\u2500 examples/\r\n\u2502   \u251c\u2500\u2500 basic_usage.py       # Basic usage examples\r\n\u2502   \u2514\u2500\u2500 advanced_usage.py    # Advanced usage examples\r\n\u251c\u2500\u2500 setup.py                 # Package configuration\r\n\u251c\u2500\u2500 pyproject.toml          # Modern packaging config\r\n\u251c\u2500\u2500 README.md               # This documentation\r\n\u251c\u2500\u2500 LICENSE                 # MIT License\r\n\u2514\u2500\u2500 .gitignore             # Git ignore patterns\r\n```\r\n\r\n## Requirements\r\n\r\n- Python 3.7 or higher\r\n- NumPy 1.19.0 or higher\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n### License Summary\r\n\r\nThe MIT License is a permissive license that allows you to:\r\n- \u2705 Use the software for any purpose\r\n- \u2705 Modify the software\r\n- \u2705 Distribute the software\r\n- \u2705 Distribute modified versions\r\n- \u2705 Use it commercially\r\n\r\nThe only requirement is that the original license and copyright notice must be included in any substantial portions of the software.\r\n\r\n## Contributing\r\n\r\nWe welcome contributions to make python-stats even better! Here's how you can help:\r\n\r\n### \ud83e\udd1d How to Contribute\r\n\r\n1. **Fork the repository**\r\n2. **Create a feature branch**: `git checkout -b feature/amazing-feature`\r\n3. **Make your changes** and add tests for new functionality\r\n4. **Run the tests**: `python -m pytest tests/ -v`\r\n5. **Commit your changes**: `git commit -m 'Add amazing feature'`\r\n6. **Push to the branch**: `git push origin feature/amazing-feature`\r\n7. **Open a Pull Request**\r\n\r\n### \ud83d\udccb Contribution Guidelines\r\n\r\n- **Code Style**: Follow PEP 8 and use Black for formatting\r\n- **Documentation**: Add docstrings for new functions\r\n- **Tests**: Include tests for new functionality\r\n- **Educational Focus**: Keep the educational value in mind\r\n- **Mathematical Accuracy**: Ensure statistical formulas are correct\r\n\r\n### \ud83d\udc1b Reporting Issues\r\n\r\nIf you find a bug or have a feature request, please open an issue on GitHub with:\r\n- Clear description of the problem\r\n- Steps to reproduce\r\n- Expected vs actual behavior\r\n- Python version and environment details\r\n\r\n## Testing\r\n\r\nRun the test suite:\r\n\r\n```bash\r\npython -m pytest tests/ -v\r\n```\r\n\r\n## Performance Notes\r\n\r\nThis package is designed for educational purposes and small to medium-sized datasets. For large-scale data analysis, consider using NumPy, SciPy, or Pandas for better performance.\r\n\r\n## \ud83c\udf93 Educational Focus\r\n\r\nThis package is specifically designed for educational purposes and serves as an excellent resource for:\r\n\r\n### \ud83d\udcda Learning Applications\r\n- **Statistics Courses**: Covers undergraduate statistics curriculum\r\n- **Programming Education**: Demonstrates Python package development\r\n- **Research Methods**: Practical statistical analysis tools\r\n- **Data Science**: Foundation for more advanced analysis\r\n\r\n### \ud83c\udfaf Key Educational Features\r\n- **Mathematical Transparency**: Clear implementation of statistical formulas\r\n- **Comprehensive Examples**: Step-by-step usage demonstrations\r\n- **Pure Python**: Easy to understand and modify\r\n- **Well-Documented**: Detailed docstrings with mathematical explanations\r\n- **Test-Driven**: All functions thoroughly tested for accuracy\r\n\r\n### \ud83d\udca1 Use Cases\r\n- **Classroom Teaching**: Interactive statistics demonstrations\r\n- **Self-Learning**: Understanding statistical concepts through code\r\n- **Research Projects**: Small-scale statistical analysis\r\n- **Code Review**: Learning Python best practices\r\n- **Portfolio Projects**: Showcasing statistical programming skills\r\n\r\nThe code is well-documented with clear mathematical formulas and examples, making it ideal for educational use.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n- **NumPy**: For efficient numerical computations\r\n- **Scientific Community**: For statistical formulas and methodologies\r\n- **Open Source Community**: For inspiration and best practices\r\n- **Educational Institutions**: For feedback and testing\r\n\r\n## \ud83d\udcde Support\r\n\r\nIf you have questions, suggestions, or need help:\r\n\r\n- **Issues**: [GitHub Issues](https://github.com/RanaEhtashamAli/py-stats/issues)\r\n- **Discussions**: [GitHub Discussions](https://github.com/RanaEhtashamAli/py-stats/discussions)\r\n- **Documentation**: This README and function docstrings\r\n- **Examples**: Check the `examples/` directory for usage demonstrations\r\n\r\n---\r\n\r\n**Made with \u2764\ufe0f for the educational community** \r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A pure-Python module providing comprehensive statistics functions",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/RanaEhtashamAli/py-stats/issues",
        "Documentation": "https://github.com/RanaEhtashamAli/py-stats#readme",
        "Homepage": "https://github.com/RanaEhtashamAli/py-stats",
        "Repository": "https://github.com/RanaEhtashamAli/py-stats.git"
    },
    "split_keywords": [
        "statistics",
        " math",
        " data-analysis",
        " scientific-calculator"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5a487161ae4449660344a067b4fcbf11831ff9153841ded092ac71f356a75354",
                "md5": "7bab7ca0e017d161d23f043c62985f72",
                "sha256": "951ecd1a51d4a0fecfd760921c2c141bd7d637e2aa266eff7a6e80162de8978b"
            },
            "downloads": -1,
            "filename": "python_stats-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7bab7ca0e017d161d23f043c62985f72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 19012,
            "upload_time": "2025-08-02T23:02:02",
            "upload_time_iso_8601": "2025-08-02T23:02:02.264563Z",
            "url": "https://files.pythonhosted.org/packages/5a/48/7161ae4449660344a067b4fcbf11831ff9153841ded092ac71f356a75354/python_stats-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3bb84c58f10dbc9dd7f05276000ac3dd009bd3396b97dfcb33fe3e9000beb782",
                "md5": "baf44b60e3531747280d6c847f3e54d3",
                "sha256": "9aa08853e1b48787479f17b0ffd05795eca77aa55715760e730dd6f769a9c83c"
            },
            "downloads": -1,
            "filename": "python_stats-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "baf44b60e3531747280d6c847f3e54d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 29832,
            "upload_time": "2025-08-02T23:02:03",
            "upload_time_iso_8601": "2025-08-02T23:02:03.890520Z",
            "url": "https://files.pythonhosted.org/packages/3b/b8/4c58f10dbc9dd7f05276000ac3dd009bd3396b97dfcb33fe3e9000beb782/python_stats-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-02 23:02:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RanaEhtashamAli",
    "github_project": "py-stats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "python-stats"
}
        
Elapsed time: 2.65691s