Calculator Inputs
Example Data Table
| Observation | X | Y | Fitted Trend Comment |
|---|---|---|---|
| 1 | 1 | 2.1 | Initial response starts near the fitted line. |
| 2 | 2 | 3.9 | Observed value remains close to linear growth. |
| 3 | 3 | 5.8 | Early trend supports a positive slope. |
| 4 | 4 | 8.5 | This point slightly lifts the estimated line. |
| 5 | 5 | 10.2 | Midrange data keeps uncertainty reasonably narrow. |
| 6 | 6 | 12.1 | Pairwise fit continues upward with mild noise. |
| 7 | 7 | 14.4 | Later points strengthen the linear pattern. |
| 8 | 8 | 15.8 | This value adds realistic sampling variation. |
| 9 | 9 | 18.3 | Upper range supports stable slope estimation. |
| 10 | 10 | 20.5 | End point helps define the interval band. |
Formula Used
The fitted simple linear regression is ŷ = b0 + b1x. The slope equals b1 = Σ[(xi - x̄)(yi - ȳ)] / Σ[(xi - x̄)²]. The intercept equals b0 = ȳ - b1x̄.
Pairwise bootstrap resampling repeatedly draws whole observations with replacement. Each resample creates a new slope, intercept, fitted line, and optional target prediction. The confidence interval uses percentile bounds from the empirical bootstrap distribution.
For confidence level C, let α = (1 - C) / 2. The lower bound is the α percentile. The upper bound is the 1 - α percentile.
How to Use This Calculator
- Enter X values in the first box.
- Enter matching Y values in the second box.
- Choose the confidence level and bootstrap count.
- Optionally enable a target X prediction interval.
- Set decimal precision for cleaner reporting.
- Submit the form to generate estimates and intervals.
- Review the summary table and Plotly charts.
- Export the summary using CSV or PDF.
Higher bootstrap counts improve interval stability but increase runtime. Around 2000 to 5000 resamples often balances speed and precision well.
Frequently Asked Questions
1. What does this calculator estimate?
It estimates a simple linear regression line and builds bootstrap percentile confidence intervals for the slope, intercept, R squared, and optional target prediction.
2. Why use bootstrap intervals instead of textbook formulas?
Bootstrap intervals rely on repeated resampling from observed data. They can be useful when normality assumptions are uncertain or when you want an empirical interval estimate.
3. What kind of data works best here?
This tool works best with paired numeric observations that roughly follow a linear relationship. Very small samples or strong nonlinear patterns can weaken interpretation.
4. What does the prediction option do?
It computes the fitted Y value at a chosen X value for every resample. The interval summarizes uncertainty around that fitted target estimate.
5. How many bootstrap samples should I use?
Around 2000 is a practical starting point. Use 5000 or more when you want smoother percentile estimates and can allow a longer calculation time.
6. Can I enter comma separated values?
Yes. The calculator accepts line breaks, commas, spaces, or semicolons. Just keep X and Y lists aligned by position.
7. Why might the calculator show an input error?
Errors appear when lists have different lengths, contain nonnumeric values, use too few observations, or provide identical X values that break slope estimation.
8. Does the chart show interval uncertainty visually?
Yes. The regression chart overlays the fitted line with a bootstrap confidence band, while the distribution chart shows sampled coefficient behavior across resamples.