public static void FillCharacteristicsGrid(List <double> data, DataGridView dgv) { dgv.Rows.Clear(); CharacteristicsGridModel gridModel = new CharacteristicsGridModel(dgv); var avrgScore = StatCharacteristicModel.Average.GetAverage(data); var avrgDeviation = StatCharacteristicModel.Average.GetMarkDeviation(data); gridModel.Average.Cells[0].Value = avrgScore.ToString("G7"); gridModel.Average.Cells[1].Value = avrgDeviation.ToString("G7"); gridModel.Average.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(avrgScore, avrgDeviation).ToString("G7"); gridModel.Average.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(avrgScore, avrgDeviation).ToString("G7"); gridModel.Median.Cells[0].Value = StatCharacteristicModel.GetMedian(data).ToString("G7"); gridModel.Median.Cells[1].Value = "-"; gridModel.Median.Cells[2].Value = "-"; gridModel.Median.Cells[3].Value = "-"; var sdNotSkewScore = StatCharacteristicModel.StandartDeviationNotSkew.GetValue(data); var sdNotSkewDeviation = StatCharacteristicModel.StandartDeviationNotSkew.GetDeviation(data); gridModel.StandartDeviationNotSkew.Cells[0].Value = sdNotSkewScore.ToString("G7"); gridModel.StandartDeviationNotSkew.Cells[1].Value = sdNotSkewDeviation.ToString("G7"); gridModel.StandartDeviationNotSkew.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(sdNotSkewScore, sdNotSkewDeviation).ToString("G7"); gridModel.StandartDeviationNotSkew.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(sdNotSkewScore, sdNotSkewDeviation).ToString("G7"); var asymetryScore = StatCharacteristicModel.AsymmetryCoefficientNotSkew.GetValue(data); var asmetryDeviation = StatCharacteristicModel.AsymmetryCoefficientNotSkew.GetDeviation(data); gridModel.AsymetryCoef.Cells[0].Value = asymetryScore.ToString("G7"); gridModel.AsymetryCoef.Cells[1].Value = asmetryDeviation.ToString("G7"); gridModel.AsymetryCoef.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(asymetryScore, asmetryDeviation).ToString("G7"); gridModel.AsymetryCoef.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(asymetryScore, asmetryDeviation).ToString("G7"); var excessScore = StatCharacteristicModel.ExcessNotSkew.GetValue(data); var excessDeviation = StatCharacteristicModel.ExcessNotSkew.GetDeviation(data); gridModel.ExcessCoef.Cells[0].Value = excessScore.ToString("G7"); gridModel.ExcessCoef.Cells[1].Value = excessDeviation.ToString("G7"); gridModel.ExcessCoef.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(excessScore, excessDeviation).ToString("G7"); gridModel.ExcessCoef.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(excessScore, excessDeviation).ToString("G7"); var kontrexcessScore = StatCharacteristicModel.KontrekstsessCoef.GetValue(data); var kontrexcessDeviation = StatCharacteristicModel.KontrekstsessCoef.GetDeviation(data); gridModel.KontrexcessCoef.Cells[0].Value = kontrexcessScore.ToString("G7"); gridModel.KontrexcessCoef.Cells[1].Value = kontrexcessDeviation.ToString("G7"); gridModel.KontrexcessCoef.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(kontrexcessScore, kontrexcessDeviation).ToString("G7"); gridModel.KontrexcessCoef.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(kontrexcessScore, kontrexcessDeviation).ToString("G7"); var pirsonScore = StatCharacteristicModel.PirsonCoef.GetValue(data); var pirsonDeviation = StatCharacteristicModel.PirsonCoef.GetDeviation(data); gridModel.PirsonCoef.Cells[0].Value = pirsonScore.ToString("G7"); gridModel.PirsonCoef.Cells[1].Value = pirsonDeviation.ToString("G7"); gridModel.PirsonCoef.Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(pirsonScore, pirsonDeviation).ToString("G7"); gridModel.PirsonCoef.Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(pirsonScore, pirsonDeviation).ToString("G7"); dgv.Refresh(); }
private void FillStatAnalysisGrid(List <double> data, DataGridView dgv) { var avrgScore = StatCharacteristicModel.Average.GetAverage(data); var avrgDeviation = StatCharacteristicModel.Average.GetMarkDeviation(data); dgv.Rows.Clear(); var rowId = dgv.Rows.Add(); dgv.Rows[rowId].Cells[0].Value = "Середнє"; dgv.Rows[rowId].Cells[1].Value = avrgScore.ToString("G7"); dgv.Rows[rowId].Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(avrgScore, avrgDeviation).ToString("G7"); dgv.Rows[rowId].Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(avrgScore, avrgDeviation).ToString("G7"); rowId = dgv.Rows.Add(); var sdNotSkewScore = StatCharacteristicModel.StandartDeviationNotSkew.GetValue(data); var sdNotSkewDeviation = StatCharacteristicModel.StandartDeviationNotSkew.GetDeviation(data); dgv.Rows[rowId].Cells[0].Value = "Середньоквадратичне"; dgv.Rows[rowId].Cells[1].Value = sdNotSkewScore.ToString("G7"); dgv.Rows[rowId].Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(sdNotSkewScore, sdNotSkewDeviation).ToString("G7"); dgv.Rows[rowId].Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(sdNotSkewScore, sdNotSkewDeviation).ToString("G7"); rowId = dgv.Rows.Add(); var asymetryScore = StatCharacteristicModel.AsymmetryCoefficientNotSkew.GetValue(data); var asmetryDeviation = StatCharacteristicModel.AsymmetryCoefficientNotSkew.GetDeviation(data); dgv.Rows[rowId].Cells[0].Value = "Асиметрия"; dgv.Rows[rowId].Cells[1].Value = asymetryScore.ToString("G7"); dgv.Rows[rowId].Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(asymetryScore, asmetryDeviation).ToString("G7"); dgv.Rows[rowId].Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(asymetryScore, asmetryDeviation).ToString("G7"); rowId = dgv.Rows.Add(); var excessScore = StatCharacteristicModel.ExcessNotSkew.GetValue(data); var excessDeviation = StatCharacteristicModel.ExcessNotSkew.GetDeviation(data); dgv.Rows[rowId].Cells[0].Value = "Ексцесс"; dgv.Rows[rowId].Cells[1].Value = excessScore.ToString("G7"); dgv.Rows[rowId].Cells[2].Value = StatCharacteristicModel.ConfidentialBelowBorder(excessScore, excessDeviation).ToString("G7"); dgv.Rows[rowId].Cells[3].Value = StatCharacteristicModel.ConfidentialTopBorder(excessScore, excessDeviation).ToString("G7"); }