これが私の公式です
Else : cmb1.Text = "Rata - Rata"
' hitung rata-rata
rerata = jumlah / lstData.Items.Count
' menampilkan hasil rerata ke text box
txtRerata.Text = rerata.ToString
cmb1.Text = "Variansi" Then
'inisialisasi variabel variansi
Xi = lstData.Items.Item(index:=counter)
' hitung variansi
For counter = 0 To lstData.Items.Count - 1
variansi = (Xi - rerata) * (Xi - rerata)
Next
'menampilkan hasil variansi ke text box
txtVariansi.Text = variansi.ToString
End If
これの何が問題なのですか? 結果が出ません。ありがとう
こうなったら?
ElseIf cmb1.Text = "Variansi" Then 'initialisasi variabel variansi Xi = 0
' iterasi sejumlah item dari listbox
For counter = 0 To lstData.Items.Count - 1
Xi = Xi + ((lstData.Items.Item(counter) - rerata) ^ 2)
Next
'kalkulasi variansi dan simpangan baku
variansi = Xi / (txtN.Text - 1)
SD = Math.Sqrt(variansi)
txtSD.Text = SD.ToString
'menampilkan hasil variansi ke text box
txtVariansi.Text = variansi.ToString
手伝って頂けますか ?