DreamCalc

Home | Download | Buy Now

 Scientific Calculator  Contents | Introduction | Index 
 For Business, Science, Engineering & Education   Site Map & Search 


Statistical Calculations


Statistical Modes

DreamCalc maintains two independent data lists for use in statistical calculations and data plots, namely an X-Y list and a Standard Data (SD) list. The X-Y list is used in regression analysis, and the SD list holds values with weighted frequencies. Only one list is active at any time, which depends on the calculator's current statistical mode. You can switch statistical mode instantly from either the Modes->Statistics menu on the main calculator interface or by using the [MODE] key on the Keypad.

The X-Y modes are sub-divided into regression styles, as follows:


Regression Mode (X-Y) Formula Transform Model
Linear y = Ax + B  
Logarithmic y = A.ln(x) + B, for x > 0 ln(x) & y
Exponential y = A.eBx, for y > 0 x & ln(y)
Power y = AxB, for x & y > 0 ln(x) & ln(y)
Inverse y = A / x + B, for x not 0 1/x & y
Quadratic Regression y = Ax2 + Bx + C  
Cubic Regression y = Ax3 + Bx2 + Cx + D  
Logistic Regression (Pro Only) y = A / (1 + B.eCx)  
DreamCalc Regression Modes


Transform Models

Several regression modes utilize a transform model during calculations, according to the table above. For example, when calculating SUM#X in the logarithmic X-Y mode, the result given will be the sum of ln(x), rather than simply the x-values added together. For modes which don't employ a transform model, i.e. polynomial and logistic regressions, the linear sum would simply be returned.


Keying in Data

List Window

The most convenient method of data input is to use the spreadsheet style interface provided in the Graphing & List Window. The main calculator interface is instantly aware of any modifications you make here.

To display the list window, press F12 at any time.

From the Keypad

If you only have a few data points, or simply want some punishment, you can use the main keypad to add values to the list in sequence.

To enter a value, simply key it in and press [DAT]. You should use the separator key [;] to enter paired values, for example:

45 [;] 3
[DAT]

In Standard Data (SD) mode, this will enter a value of 45 with a frequency of 3, or an X-Y pair in a regression mode. If you omit the frequency in SD mode, a value of 1 will be assumed.

To clear the list from the keypad, click [CLRMEM] and select "Stats".


Logistic Regression

Professional Edition Only. DreamCalc Professional offers a logistic regression mode (sometimes referred to as sigmoid regression). This fits an s-shaped curve to the data, and determines three coefficients, according to:

  y = A / (1 + B.eC.x)

An example of a logistic curve fit is shown below.


Logistic Regression


In statistical analysis, the logistic curve is sometimes described by the formula:

  P = 1 / (1 + e-(j+kx))
  where P is a probability value between 0 and 1

and the relations:

  P = y/A
  j = -ln(B)
  k = -C

translate the coefficients used in DreamCalc.

Performing Calculations

There are two ways to perform statistical calculations.


Using the List Window

Since DreamCalc version 4, statistical calculations are possible from the list page-tab of the Graphing & List Window.

Statistical Calculations

Simply select from the Calc button drop-down menu to perform a calculation.

Using the Keypad

On the main keypad, you will find the following statistical keys:

  • [S-SUM] (SumX, SumX2 etc.)
  • [S-VAR] (MeanX, StdX[n], StdX[n-1] etc.)
  • [S-DIST] (Coefficients and Variate Z etc.)

These keys allow input of statistical functions using an on-screen menu selection.

You can page through the available functions by pressing the respective key repeatedly.



Introductory Examples

The following examples demonstrate calculation from the keypad using prefix algebraic input order. If you are using postfix algebraic or RPN, you must adjust the example input to suit.

Standard Data Example

Bring up the Graphing & List Window by pressing F12 and switch to the list page. Ensure that calculator is in SD mode by selecting the option Modes->Standard Data from the list window's menu.

Key in (or copy and paste) the following 44 sample measurements into the SD list. All frequencies should be 1.


10.88
10.25
10.2
8.71
11.23
10.88
12.33
10.67
9.96
9.08
8.76
9.23
10.56
11.09
10.7
11.08
9.84
9.59
8.22
9.89
10.6
10.61
9.12
9.6
10.58
9.11
10.02
10.51
10.96
11.11
9.85
8.95
10.16
10.11
9.39
9.28
10.27
9.52
9.1
10.1
9.65
8.48
9.47
10
Sample Measurement Values

Example 1: Mean & Confidence Interval.

Calculate an estimate of the mean based upon the above sample, and estimate a confidence interval (CI) for a 90% confidence level.

From the calculator keypad, key in:

[S-VAR] and select MeanX
Displays: 9.99318181818181818 (mean)

Alternatively, you can use the Calc button drop-down menu from the list window, as shown in the screen-shot above.

Now, the CI of the mean is given by the equation:

CI = t * StdErr

where t is the two-sided Student t-value normally found by reference to statistical tables. However, since we have more than 30 measurments, we will use DreamCalc's standard z-score function in place of the t-value, as follows:

[zs] (z-score function above the [;] key)
0.9 (90% confidence as fraction)
[×]
[S-VAR] and select StdErrX
[ENTER]
Displays: 0.21161705529476782 (CI)

Therefore, the mean is 9.9931 +/- 0.2116 with a 90% level of confidence.


Example 2: Observation Probability.

Assuming that the above data is normally distributed with a true mean of 10, estimate the probability of observing a measurement outside the range 8.8 to 11.2.

To solve this, we could calculate the normalized variate of the lower value 8.8. and then use the DreamCalc PGfunction to give the probability of observing a value smaller than 8.8. Because we know that the distribution is normal, thus symmetical, we can simply multiply by 2 give the probability of a observing a value on either side of the stated range.

Key in the following to perform this:

[PG] (probability from -INF to z)
[S-DIST] and select Z
8.8
[×]
2
[ENTER]
Displays: 0.162068

Regression Example

Put the calculator into cubic regression mode and copy the following data into the X-Y list.

Speed mph (X)
10
20
30
40
50
60
70
80
Fuel Economy mpg (Y)
22
42
46
48
45
41
39
38
Sample Atomic Data

Example 1: Regression Coefficients.

Calculate the coefficients A, B, C and D, for a line of best fit where: y = Ax3 + Bx2 + Cx + D.

[S-DIST] and select COEF_A
Displays: 4.31818181818181818E-4

[S-DIST] and select COEF_B
Displays: -0.07168831168831169

[S-DIST] and select COEF_C
Displays: 3.52326839826840218

[S-DIST] and select COEF_D
Displays: -5.5714285714292907

Example 2: Calculate Y as Function of X.

Estimate the fuel economy at 15 mph. Also estimate an error for the result.

We can use the FX(x) function to give Y (fuel economy) as a function of X (speed), as follows:

[S-DIST] and select FX(x)
15
[ENTER]
Displays: 32.6051136363629757 (estimated fuel economy)

Furthermore, we can use the RMSE (root mean square error) to give the average error from the regression line:

[S-DIST] and select RMSE
Displays: 1.26659261574385245 (estimated error)

NOTE. Press [S-DIST] twice if RMSE is not visible.

Therefore, we can say the fuel economy at 15 mph is 32.6 +/ 1.3 (approx.).

As an additional exercise, we can confirm that cubic regression was indeed the best regression mode for the data by selecting Mode->Statistics->Suggest Regression from the calculator's main menu.

DreamCalc Graphing and Professional Edition users will also be able to view the data as an X-Y plot, as shown below.

Cubic Regression
X-Y Plot with Cubic Regression

If the above chart is not visible, select Chart->Scatter Points from the Graphing & List Window menu.


See also: Related Statistical Functions

Try DreamCalc for Free: Download Page

 Home | Download | Buy Now | Support | Affiliates | About Copyright Big Angry Dog Ltd