Welcome to On Statistics

  • Rock, Paper, Scissors: The Amazing Anomaly of Non-Transitive Data

    Rock, Paper, Scissors: The Amazing Anomaly of Non-Transitive Data

    Our understanding of the world relies heavily on relationships between things. We say a mountain is taller than a hill, a parent loves their child, and one concept leads to another. These connections, often expressed through verbs like “less than,” “loves,” and “leads to,” are transitive in nature. This means if A is connected to…

  • Tutorial: Creating a Linear Regression in Python

    Tutorial: Creating a Linear Regression in Python

    This tutorial guides you through building a linear regression model in Python, covering importing libraries, loading data, fitting the model, and interpreting results. 1. Import Libraries 2. Load Data Replace with your actual data source: sepal length (cm) sepal width (cm) petal length (cm) petal width (cm) predicted_y species 0 5.1 3.5 1.4 0.2 3.503062…

  • How to Use One-Way ANOVA in Python with the Iris Dataset

    How to Use One-Way ANOVA in Python with the Iris Dataset

    This tutorial demonstrates how to perform a one-way ANOVA in Python using the sklearn.feature_selection.f_classif function from the scikit-learn library. We’ll work with the iris dataset included in scikit-learn for an example. Importing Libraries: Loading the Iris Dataset: One-Way ANOVA with scikit-learn: Explanation: Interpreting Results: In this example, the f_statistic and p_value will depend on the…