help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
statsmodels-statistical
RSK World
statsmodels-statistical
Statistical Modeling with Statsmodels
statsmodels-statistical
  • __pycache__
  • data
  • examples
  • notebooks
  • .gitignore458 B
  • CHANGELOG.md4 KB
  • FEATURES.md6.3 KB
  • LICENSE1.2 KB
  • PROJECT_INFO.md2.2 KB
  • PROJECT_SUMMARY.md4.2 KB
  • README.md7.4 KB
  • RELEASE_NOTES_v1.0.0.md6.5 KB
  • UNIQUE_FEATURES.md5.3 KB
  • advanced_time_series.py9.8 KB
  • automated_reporting.py8.3 KB
  • bayesian_statistics.py7.5 KB
  • data_preprocessing.py8.2 KB
  • econometric_modeling.py9.8 KB
  • hypothesis_testing.py12.5 KB
  • index.html10.8 KB
  • model_evaluation.py9.1 KB
  • model_persistence.py6.5 KB
  • model_selection.py9.7 KB
  • panel_data_analysis.py7.3 KB
  • performance_benchmarking.py7.3 KB
  • regression_analysis.py9 KB
  • requirements.txt361 B
  • statistical_diagnostics.py13.8 KB
  • statsmodels-statistical.png284 B
  • time_series_analysis.py10.3 KB
  • visualization_utils.py8.9 KB
hypothesis_testing_example.pyeconometric_data.csvhypothesis_test_data.csv
examples/hypothesis_testing_example.py
Raw Download
Find: Go to:
"""
Hypothesis Testing Example

Author: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277
"""

import numpy as np
import sys
import os

# Add parent directory to path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from hypothesis_testing import StatisticalTests


def main():
    print("Hypothesis Testing Example")
    print("=" * 70)
    
    # Generate sample data
    np.random.seed(42)
    sample1 = np.random.normal(100, 15, 30)
    sample2 = np.random.normal(105, 15, 30)
    sample3 = np.random.normal(110, 15, 30)
    
    # Create test object
    tests = StatisticalTests()
    
    # T-test
    print("\nT-Test:")
    print("=" * 70)
    tests.t_test(sample1, sample2)
    
    # ANOVA test
    print("\n" + "=" * 70)
    print("ANOVA Test:")
    print("=" * 70)
    tests.anova_test({
        'Group 1': sample1,
        'Group 2': sample2,
        'Group 3': sample3
    })
    
    # Normality test
    print("\n" + "=" * 70)
    print("Normality Test:")
    print("=" * 70)
    tests.normality_test(sample1)
    
    # Chi-square test
    print("\n" + "=" * 70)
    print("Chi-Square Test:")
    print("=" * 70)
    observed = np.array([30, 25, 20, 15, 10])
    expected = np.array([20, 20, 20, 20, 20])
    tests.chi_square_test(observed, expected)


if __name__ == "__main__":
    main()

66 lines•1.4 KB
python
data/econometric_data.csv
Raw Download
Find: Go to:
date,GDP,Consumption,Investment,Unemployment
2020-01-01,100.0,85.0,45.0,5.2
2020-02-01,101.2,86.1,45.5,5.1
2020-03-01,102.5,87.3,46.2,5.0
2020-04-01,103.8,88.5,47.0,4.9
2020-05-01,105.1,89.7,47.8,4.8
2020-06-01,106.4,90.9,48.5,4.7
2020-07-01,107.7,92.1,49.3,4.6
2020-08-01,109.0,93.3,50.0,4.5
2020-09-01,110.3,94.5,50.8,4.4
2020-10-01,111.6,95.7,51.5,4.3
2020-11-01,112.9,96.9,52.3,4.2
2020-12-01,114.2,98.1,53.0,4.1
2021-01-01,115.5,99.3,53.8,4.0
2021-02-01,116.8,100.5,54.5,3.9
2021-03-01,118.1,101.7,55.3,3.8
2021-04-01,119.4,102.9,56.0,3.7
2021-05-01,120.7,104.1,56.8,3.6
2021-06-01,122.0,105.3,57.5,3.5
2021-07-01,123.3,106.5,58.3,3.4
2021-08-01,124.6,107.7,59.0,3.3
2021-09-01,125.9,108.9,59.8,3.2
2021-10-01,127.2,110.1,60.5,3.1
2021-11-01,128.5,111.3,61.3,3.0
2021-12-01,129.8,112.5,62.0,2.9
2022-01-01,131.1,113.7,62.8,2.8
2022-02-01,132.4,114.9,63.5,2.7
2022-03-01,133.7,116.1,64.3,2.6
2022-04-01,135.0,117.3,65.0,2.5
2022-05-01,136.3,118.5,65.8,2.4
2022-06-01,137.6,119.7,66.5,2.3
2022-07-01,138.9,120.9,67.3,2.2
2022-08-01,140.2,122.1,68.0,2.1
2022-09-01,141.5,123.3,68.8,2.0
2022-10-01,142.8,124.5,69.5,1.9
2022-11-01,144.1,125.7,70.3,1.8
2022-12-01,145.4,126.9,71.0,1.7

39 lines•1.2 KB
csv
data/hypothesis_test_data.csv
Raw Download
Find: Go to:
group,value
A,98.5
A,99.2
A,97.8
A,100.1
A,99.5
A,98.9
A,100.3
A,99.7
A,98.2
A,100.5
B,102.3
B,103.1
B,101.8
B,103.5
B,102.7
B,103.9
B,102.1
B,103.3
B,102.8
B,103.6
C,105.2
C,106.1
C,104.8
C,106.5
C,105.7
C,106.9
C,105.1
C,106.3
C,105.8
C,106.7
D,108.5
D,109.2
D,107.8
D,110.1
D,109.5
D,108.9
D,110.3
D,109.7
D,108.2
D,110.5

43 lines•368 B
csv
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer