Calculator Inputs
Plotly Graph
The chart displays the linear relationship between X and Y = aX + b.
Example Data Table
| Scenario | E[X] | Var(X) | a | b | E[Y] | Var(Y) |
|---|---|---|---|---|---|---|
| Exam score scaling | 70 | 25 | 1.1 | 5 | 82 | 30.25 |
| Temperature shift | 20 | 9 | 1 | 32 | 52 | 9 |
| Currency conversion | 100 | 16 | 0.8 | 0 | 80 | 10.24 |
| Inverted score line | 12 | 4 | -2 | 10 | -14 | 16 |
Formula Used
Linear transformation: Y = aX + b
Here, X is the original random variable. The value a scales X, while b shifts all outcomes by a constant amount.
Expected value formula: E[Y] = aE[X] + b
The constant b changes the center directly. The coefficient a stretches or flips the average depending on its sign and size.
Variance formula: Var(Y) = a²Var(X)
Variance is unaffected by adding b. Only scaling changes the spread, and the squaring removes any negative sign from a.
Standard deviation formula: SD(Y) = |a|SD(X)
Standard deviation scales by the absolute value of a because spread is always measured as a nonnegative quantity.
How to Use This Calculator
- Enter the mean of the original random variable X.
- Enter the variance of X as a nonnegative number.
- Provide the linear coefficient a and constant b.
- Set graph range values to inspect the line visually.
- Add sample X values to create a custom output table.
- Press Calculate Now to display results above the form.
- Review transformed mean, variance, deviation, and interpretation.
- Download CSV or PDF for reporting or revision.
Frequently Asked Questions
1. What does this calculator compute?
It computes the transformed mean, variance, standard deviation, and example outputs for a linear random variable transformation of the form Y = aX + b.
2. Why does adding b not change variance?
Adding a constant shifts every value equally. Distances from the center stay unchanged, so the variance remains the same after the shift.
3. Why is a squared in the variance formula?
Variance measures squared spread. When values are multiplied by a, the spread scales by a². Negative scaling flips direction but cannot make variance negative.
4. Can a be negative?
Yes. A negative a reflects the variable across the axis and changes the sign of the mean contribution, while variance still depends on a².
5. Can I use decimals for all fields?
Yes. The calculator accepts decimal inputs for the mean, variance, coefficients, graph range, and sample X values.
6. What if variance is zero?
Then X is constant. The transformed variable Y also becomes constant, and its variance remains zero regardless of the shift b.
7. What does the graph show?
The graph shows the straight-line relationship between sample X values and transformed Y values. It helps visualize scaling, reflection, and vertical shifting.
8. When is this calculator useful?
It is useful in probability, statistics, finance, quality analysis, classroom exercises, and any setting involving affine transformations of measured variables.