Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pearson Regression Analyzer

I chose this project to demonstrate my ability to translate complex mathematical formulas into clean, algorithmic code from scratch, while also showcasing my skills in building modern, interactive frontend user interfaces.

🚀 About The Project

The Pearson Regression Analyzer is a modern, interactive web application that allows users to analyze the statistical correlation between continuous datasets. It calculates exactly how two variables relate to each other (e.g., Temperature vs. Sales) and instantly visualizes the data through an interactive scatter plot overlaid with a calculated line of best fit.

To demonstrate a strong foundation in computer science and mathematics, all statistical computations were implemented entirely from scratch in pure JavaScript without relying on external math libraries.

✨ Features

  • Manual Data Entry: Instantly add x and y coordinates with built-in form validation.
  • Bulk CSV Upload: Easily parse and import massive datasets using .csv files.
  • Real-Time Calculation: Automatically computes Arithmetic Means, Standard Deviations, and the Pearson Correlation Coefficient as data changes.
  • Dynamic Visualization: Renders a responsive scatter plot and calculates the exact Linear Regression (Line of Best Fit) directly on the chart.
  • Smart Interpretation: Translates complex mathematical outputs into human-readable interpretations (e.g., "Strong Positive Correlation").

🛠️ Built With

  • Frontend Framework: React (via Vite)
  • Styling: Modern Vanilla CSS (Light Theme)
  • Charting: Recharts
  • CSV Parsing: PapaParse

🧮 Mathematical Concepts Implemented From Scratch

This project translates the following mathematical concepts into algorithmic JavaScript functions:

  1. Arithmetic Mean - Used to find the central tendency of both the X and Y datasets.
  2. Standard Deviation - Used to measure the amount of variation or dispersion within the datasets.
  3. Pearson Correlation Coefficient (r) - Used to measure the linear correlation between the two sets of data (outputs a value between -1 and 1).
  4. Simple Linear Regression - Used to calculate the slope (m) and y-intercept (b) to draw the most accurate predictive line through the scatter plot.

💻 Running Locally

To get a local copy up and running, follow these simple steps.

Prerequisites

  • Node.js installed on your machine.

Installation

  1. Clone the repository:
    git clone https://github.com/your_username/pearson-regression-app.git
  2. Navigate into the project directory:
    cd pearson-regression-app
  3. Install the required NPM packages:
    npm install
  4. Start the development server:
    npm run dev
  5. Open the provided localhost link in your browser to view the app!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages