OK. Thank you all for your help. You guys definitely got me pointed in the right direction. this is my first class in my major and we are only covering the basics of VB. A lot of the things you were showing me was out of our range, so to speak. But, it did help me see what the program was supposed to be doing. All in all, using what we have been taught, this is what I came up with:


vb Code:
  1. Dim scores() As Double = {59, 60, 65, 75, 56, 90, 66, 62, 98, 72, 95, 71, 63, 77, 65, 77, 65, 50, 85, 62} 'Places the scores into the array
  2.     Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
  3.         Dim add, n, mean, sd As Double 'This declares which variables are to be used as a double data type
  4.         Dim grade As String 'This declares which variables are to be used as a string data type
  5.         add = 0 'assigns a base value of 0 to this variable
  6.         lstDisplay.Items.Clear() 'clears the list box of any old data
  7.         For n = LBound(scores) To UBound(scores) 'loop to establish the limits on the array and assigns the value 20 to the variable n
  8.         Next 'ends the loop
  9.         For a As Double = LBound(scores) To UBound(scores) 'loop to total the exam scores and calculate the standard deviation
  10.             add += scores(a) 'totals the exam scores
  11.             sd = Math.Sqrt((scores(a) - mean) ^ 2 / n) 'formula for finding the standard deviation
  12.         Next
  13.         mean = (add / n) 'formula for finding the mean
  14.         outputInfo(add, mean, sd, n, grade) 'establishes the parameters for the sub procedure
  15.     End Sub
  16.     Sub outputInfo(ByRef add As Double, ByRef mean As Double, ByRef sd As Double, ByRef n As Double, ByVal grade As String)
  17.         Dim fmtStrHeader As String = "{0,-10}{1,12}" 'establishes my string header
  18.         lstDisplay.Items.Add("There were " & n & " exams.") 'displays the total amount of exams
  19.         lstDisplay.Items.Add("Mean: " & mean) 'displays the mean
  20.         lstDisplay.Items.Add("Std. Deviation: " & FormatNumber(sd, 2)) 'displays the standard deviation
  21.         lstDisplay.Items.Add("") 'skips a line
  22.         lstDisplay.Items.Add(String.Format(fmtStrHeader, "Score", "Grade")) 'displays the columns for score and grade
  23.         For m As Integer = LBound(scores) To UBound(scores) 'Loop for establishing which letter grade goes with which scores
  24.             If scores(m) >= mean + (1.5 * sd) Then 'determines what score gets an A
  25.                 grade = "A"
  26.             ElseIf mean + (0.5 * sd) <= scores(m) And scores(m) < mean + (1.5 * sd) Then 'determines what score gets a B
  27.                 grade = "B"
  28.             ElseIf mean - (0.5 * sd) <= scores(m) And scores(m) < mean + (0.5 * sd) Then 'determines what score gets a C
  29.                 grade = "C"
  30.             ElseIf mean - (1.5 * sd) <= scores(m) And scores(m) < mean - (0.5 * sd) Then 'determines what score gets a D
  31.                 grade = "D"
  32.             ElseIf (scores(m) < mean - (1.5 * sd)) Then 'determines what score gets a F
  33.                 grade = "F"
  34.             End If
  35.             lstDisplay.Items.Add(String.Format(fmtStrHeader, scores(m), grade)) 'displays the scores with their corresponding grade
  36.         Next 'closes the loop
  37.     End Sub 'tells the program where the sub procedure ends

I hope that is readable. Anyways, its working and you guys definitely helped. Thanks a ton.