Close Menu
    Trending
    • How to Access NASA’s Climate Data — And How It’s Powering the Fight Against Climate Change Pt. 1
    • From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025
    • Using Graph Databases to Model Patient Journeys and Clinical Relationships
    • Cuba’s Energy Crisis: A Systemic Breakdown
    • AI Startup TML From Ex-OpenAI Exec Mira Murati Pays $500,000
    • STOP Building Useless ML Projects – What Actually Works
    • Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025
    • The New Career Crisis: AI Is Breaking the Entry-Level Path for Gen Z
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»Chi-Square Test. In data science and analytics, we often… | by Nishtha kukreti | Feb, 2025
    Machine Learning

    Chi-Square Test. In data science and analytics, we often… | by Nishtha kukreti | Feb, 2025

    Team_AIBS NewsBy Team_AIBS NewsFebruary 6, 2025No Comments1 Min Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Step 1: Create the Noticed Information

    Right here’s the survey knowledge collected from the mall:

    Step 2: Compute the Anticipated Values

    The anticipated worth for every class is calculated as:

    For instance, the anticipated variety of males shopping for electronics is:

    Step 3: Implement the Chi-Sq. Check in Python

    from scipy.stats import chi2_contingency

    # Noticed frequency desk
    knowledge = [[50, 30], # Electronics: Male, Feminine
    [20, 40]] # Clothes: Male, Feminine

    # Carry out Chi-Sq. check
    chi2_stat, p_value, dof, anticipated = chi2_contingency(knowledge)

    print(f"Chi-Sq. Statistic: {chi2_stat}")
    print(f"p-value: {p_value}")
    print(f"Levels of Freedom: {dof}")
    print("Anticipated Frequencies:")
    print(anticipated)

    Step 4: Interpret the Outcomes

    • Chi-Sq. Statistic (χ²) = 10.53
    • p-value = 0.00117 (lower than 0.05 significance degree)
    • Conclusion: For the reason that p-value is small, we reject the null speculation, that means gender does affect buying preferences!
    • Market Analysis: Identifies buyer preferences throughout demographics.
    • A/B Testing: Determines if a brand new web site format performs higher.
    • Healthcare: Checks if a illness is linked to a selected way of life.
    • Social Science: Analyzes voting patterns and client conduct.

    Chi-Sq. is a strong statistical check that helps to extract insights from categorical knowledge.

    You’ll be able to run the code and examine:
    Github : https://github.com/kukretinishtha/medium_blog/blob/main/chi_square_test.ipynb

    Colab Pocket book Hyperlink:
    https://colab.research.google.com/drive/1TMs09fKykjweGxdNDB7u045LhJUr_osh?usp=sharing



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleGoogle remakes Super Bowl ad after AI cheese gaffe
    Next Article Reframing digital transformation through the lens of generative AI
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025

    July 1, 2025
    Machine Learning

    Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025

    July 1, 2025
    Machine Learning

    Why PDF Extraction Still Feels LikeHack

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    How to Access NASA’s Climate Data — And How It’s Powering the Fight Against Climate Change Pt. 1

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    The Best AI Advice I’ve Given This Year | by Nick: The AI Guru | Dec, 2024

    December 12, 2024

    How an Autopen Conspiracy Theory About Biden Went Viral

    March 24, 2025

    How to Implement Blockchain in Supply Chain Management

    February 27, 2025
    Our Picks

    How to Access NASA’s Climate Data — And How It’s Powering the Fight Against Climate Change Pt. 1

    July 1, 2025

    From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025

    July 1, 2025

    Using Graph Databases to Model Patient Journeys and Clinical Relationships

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.