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.
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.
- Manual Data Entry: Instantly add
xandycoordinates with built-in form validation. - Bulk CSV Upload: Easily parse and import massive datasets using
.csvfiles. - 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").
- Frontend Framework: React (via Vite)
- Styling: Modern Vanilla CSS (Light Theme)
- Charting: Recharts
- CSV Parsing: PapaParse
This project translates the following mathematical concepts into algorithmic JavaScript functions:
- Arithmetic Mean - Used to find the central tendency of both the X and Y datasets.
- Standard Deviation - Used to measure the amount of variation or dispersion within the datasets.
- Pearson Correlation Coefficient (r) - Used to measure the linear correlation between the two sets of data (outputs a value between -1 and 1).
- Simple Linear Regression - Used to calculate the slope (
m) and y-intercept (b) to draw the most accurate predictive line through the scatter plot.
To get a local copy up and running, follow these simple steps.
- Node.js installed on your machine.
- Clone the repository:
git clone https://github.com/your_username/pearson-regression-app.git
- Navigate into the project directory:
cd pearson-regression-app - Install the required NPM packages:
npm install
- Start the development server:
npm run dev
- Open the provided
localhostlink in your browser to view the app!