ISmLogNormalDistribution.Mean

Syntax

Mean: Double;

Description

The Mean property determines expected value.

Example

To execute the example, the form must have the ChartBox component and the UiChart component which serves as the source for ChartBox.

Class OBJ18693Form: Form
    ChartBox1: ChartBox;
    UiChart1: UiChart;
    LogNorm: SmLogNormalDistribution;
    Values: Array Of Double;
    Const Cnt = 100;

    Sub OBJ18693FormOnCreate(Sender: Object; Args: IEventArgs);
    Begin
        LogNorm := New SmLogNormalDistribution.Create;
        Text := LogNorm.DisplayName;
        LogNorm.Mean := 3.6;
        LogNorm.Variance := 0.5;
        Values := LogNorm.RandomVector(Cnt);
        UiChart1.PointCount := cnt;
    End Sub OBJ18693FormOnCreate;
    
    Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);
    Begin
        If Args.PointIndex < Cnt Then
            Args.Value := Values[Args.PointIndex];
            Args.Result := True;
        End If;
    End Sub UiChart1OnGetDataValue;
End Class OBJ18693Form;

After executing the example a graph of logarithmically normal distribution is created:

See also:

ISmLogNormalDistribution