GUIvar shows the necessary calculations to obtain the variance in a GUI.




out =GUIvar(x) Variance of the first 6 natural numbers.


out =GUIvar(x, w) Calculation of variance (using n as denominator).


expand all

  • Calculation of variance (using n as denominator).
  • See page 9 of [CMR]

    x=[427 492 445 444 476 470];

    Related Examples

    expand all

  • Example of weighted variance.
  • See page 128 of [MRZ]

    x=[25:50:175 250 400 750];
    w=[59 69 31 25 8 3 1];
    Click here for the graphical output of this example (link to Ro.S.A. website)

    Input Arguments

    expand all

    x — vector of numeric data. Vector.

    Vector containing strictly numerical data.

    Data Types: double

    Optional Arguments

    w — weights. Vector or scalar.

    Vector of the same length of x containing the weights assigned to each observation or scalar which specifies the normalization to use If w=1 the denominator of the index corresponds to the number of observations.

    If w=0 (default), the denominator of the index corresponds to the number of observations minus 1. If w is not supplied we assume that all observations have weight equal to 1 and the index is normalized with length(x)-1.

    Example: 1:10

    Data Types: double

    Output Arguments

    expand all

    out —detailed output to compute the index. Table

    Table with n+1 rows (where n is the length of x) containing what is shown in the GUI. Last row contains the totals.


    Milioli, M.A., Riani, M., Zani, S. (2019), "Introduzione all'analisi dei dati statistici (Quarta edizione ampliata)". [MRZ]

    Cerioli, A., Milioli, M.A., Riani, M. (2016), "Esercizi di statistica (Quinta edizione)". [CMR]

    This page has been automatically generated by our routine publishFS