Hi, If someone can help me, Id really appreciate it. The task is to input numbers (seperated by commas) into a textarea and then when the user clicks "plot" the mean and standard deviation appear in the appropriate textareas. In addition, a histogram is constructed from the numbers in the array. I have some code but it does not seem to work.
Can someone give me some tips. I am new at all this stuff.
David's Computer Program
var A = new Array(); var freq = new Array();
var A = s.split(",");
var mean; var sum=0;
A = document.davidForm.main1.value.split(",");
function clearMainScreen() { window.document.david.main1.value = ""; }
fucntion displayAvg() { var mean = document.davidForm.main1.value; for (var i = 0; i = A.length-1; i++) { A[i] = parseInt(A[i]); sum = sum + A[i]; } mean = (sum / A.length); window.alert("mean"); }
function standardDeviation (){ var smsq = sum+sum var stdr = Math.sqrt((smsq-smsq/A.length)/A.length-1))
Comments