Statistics Tutorial

Linear Regression with Vector Data on Windows

A small linear-regression example can show how paired data, correlation, a fitted line, and a visual plot relate to one another. This tutorial uses released SumWise 3.1 Store vector and regression commands, then interprets the result without treating the application as a complete statistics package.

Statistics and regression in one Windows workspace

Review supported descriptive statistics, paired-vector inputs, current limits, and trial details in Statistics and Regression Calculator for Windows.

SumWise 2.4 regression plot with five paired points, a fitted line, slope, intercept, correlation, and R squared.
The verified example keeps the paired points, fitted line, and numeric regression summary together.

Create the Paired Data

Use one vector for x-values and a second vector for the corresponding y-values. In this example, x contains the values 1 through 5 and y contains five synthetic values, entered manually (not imported from CSV):

vector(1,2,3,4,5)
vector(2,4,5,4,5)

The entries pair by position: (1,2), (2,4), (3,5), (4,4), and (5,5). The two vectors must have matching lengths and contain real numeric data for the supported paired-data workflow.

Calculate Correlation

Pass two vectors to the supported Pearson correlation function:

correlation(vector(1,2,3,4,5), vector(2,4,5,4,5))

Correlation measures the direction and strength of linear association. A positive value indicates that larger x-values tend to occur with larger y-values in this sample. It does not prove causation and does not by itself tell you whether a linear model is appropriate for a consequential decision.

Calculate the Fitted Line

Use the same paired vectors with the linear-regression function:

linear_regression(vector(1,2,3,4,5), vector(2,4,5,4,5))

For supported paired data, linear_regression(...) returns a 1-by-2 row matrix in the form [slope, intercept]: here the entries represent 0.6 and 2.2. The slope estimates how much fitted y changes for each one-unit increase in x. The intercept is the fitted y-value at x equal to zero, even if zero lies outside the observed data range.

Graph the Points and Regression Line

Now ask SumWise to prepare the regression plot:

graph_regression(vector(1,2,3,4,5), vector(2,4,5,4,5))

The retained, labelled 2.4 screenshot illustrates the same regression commands; the mathematical results for this synthetic example are:

Points
5
Slope / intercept
0.6 / 2.2
Correlation
Approximately 0.774597
R-squared
0.6
Fitted line
y = 0.6x + 2.2

The positive slope matches the visible upward direction of the fitted line. The correlation is positive but below 1 because the points do not fall perfectly on a straight line. R-squared is a basic fit summary; the displayed value of 0.6 should be interpreted in the context of this small example rather than as a universal model-quality threshold.

Inspect the Visual Result

Compare each plotted point with the fitted line. The point at (3,5) lies above the line, while (4,4) lies below it. Those deviations are part of why the fit is not perfect. The graph is useful for checking the overall pattern and spotting observations that deserve attention before relying on a summary alone.

Use the visible zoom, pan, and reset controls when you need a closer view. The graph can also be copied as an image or exported as PNG for notes and teaching material.

Add Descriptive Context

You can reuse either vector with supported descriptive functions. For example:

mean(vector(2,4,5,4,5))
standard_deviation(vector(2,4,5,4,5))

These calculations describe the y-values themselves, while correlation and regression describe the relationship between x and y. Keeping them in one history helps maintain the connection between the data and the summaries you calculate.

Current Scope and Responsible Use

This tutorial demonstrates the established paired-vector regression workflow: descriptive statistics, Pearson correlation, a fitted line and its plot. SumWise 3.3 also includes supported mean tests and ordinary and Welch one-way ANOVA. Its separate fitted-model checking workflow offers supported diagnostics without automatically selecting a best model. See the current Statistics guide for methods, assumptions and limits. This example does not demonstrate multiple regression, general time-series modelling or automatic model selection. Check important results with appropriate methods and professional judgment.

Once SumWise is installed, these calculations and graph preparation are designed to run locally. Microsoft Store manages installation, the trial, purchase, and license verification.

Save the check; export the plot

Save the calculations and supported regression graph state in a .sumwise workspace, then reopen it to review the saved snapshot. Keep the literal paired-vector command with your results so the input remains inspectable. Export the existing graph as PNG for presentation; keep coefficients as text when useful.

This scatter/regression graph is not eligible for the quantity-only graph portion of the HTML Analysis Report. This workflow does not import CSV, maintain source-file links, edit datasets, solve matrices or validate a statistical model automatically.

Try this released Store workflow

SumWise Desktop is US$24.99 one-time, with no Desktop subscription. The full-featured seven-day trial is available through Microsoft Store only.

See Direct purchase and delivery details ยท Try for 7 days on Microsoft Store

Before Direct payment, contact SumWise to confirm the supplied version and agree delivery timing. The initial Direct download is unsigned; Windows may warn or block it. Do not disable Windows security. These examples do not establish the version delivered through Direct.

Try the complete regression workflow

Return to the Statistics and Regression Calculator for Windows guide or use every SumWise feature during the full 7-day trial. Continue afterward for a one-time $24.99 purchase with no subscription.

Try SumWise free for 7 days