Close Menu
    Trending
    • How generative AI could help make construction sites safer
    • PCA and SVD: The Dynamic Duo of Dimensionality Reduction | by Arushi Gupta | Jul, 2025
    • 5 Ways Artificial Intelligence Can Support SMB Growth at a Time of Economic Uncertainty in Industries
    • Microsoft Says Its AI Diagnoses Patients Better Than Doctors
    • From Reporting to Reasoning: How AI Is Rewriting the Rules of Data App Development
    • Can AI Replace Doctors? How Technology Is Shaping Healthcare – Healthcare Info
    • Singapore police can now seize bank accounts to stop scams
    • How One Founder Is Rethinking Supplements With David Beckham
    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

    PCA and SVD: The Dynamic Duo of Dimensionality Reduction | by Arushi Gupta | Jul, 2025

    July 2, 2025
    Machine Learning

    Can AI Replace Doctors? How Technology Is Shaping Healthcare – Healthcare Info

    July 2, 2025
    Machine Learning

    Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025

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

    Top Posts

    How generative AI could help make construction sites safer

    July 2, 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

    Warren Buffett Is Retiring as CEO of Berkshire Hathaway

    May 3, 2025

    4chan and porn sites investigated by Ofcom

    June 10, 2025

    Building a Movie Recommendation Dashboard with H2O Wave | by Abhijaysaipal | Mar, 2025

    March 25, 2025
    Our Picks

    How generative AI could help make construction sites safer

    July 2, 2025

    PCA and SVD: The Dynamic Duo of Dimensionality Reduction | by Arushi Gupta | Jul, 2025

    July 2, 2025

    5 Ways Artificial Intelligence Can Support SMB Growth at a Time of Economic Uncertainty in Industries

    July 2, 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.