Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Mean Variance and Standard Deviation examples and calculator in data mining

Enter the values of which you want to find MEAN VARIANCE AND STANDARD DEVIATION:

Enter first value here:-

Enter second value here:-

Enter third value here:-

Enter fourth value here:-

Result of what you enter

[insert_php] if(isset($_POST[‘submit’]))
{
$a=$_POST[‘value1’];
$b=$_POST[‘value2’];
$c=$_POST[‘value3’];
$d=$_POST[‘value4’]; //posted user’s values to varriables

$mean=($a+$b+$c+$d)/4; //actual logic of calculation by formula starting
$varienceA=($a-$mean);
$sqrA=$varienceA*$varienceA;
$varienceB=($b-$mean);
$sqrB=$varienceB*$varienceB;
$varienceC=($c-$mean);
$sqrC=$varienceC*$varienceC;
$varienceD=($d-$mean);
$sqrD=$varienceD*$varienceD;
$sum=$sqrA+$sqrB+$sqrC+$sqrD;
$finalvarience=$sum/4;
$standarddeviation= sqrt($finalvarience); //ALL calculations completed

//results being showed in a table with users inputs after calculations
echo ‘

‘;echo “”;echo””;
echo””;
echo””;
echo””;
echo””;
echo “”;echo “”;echo””;
echo””;
echo “”;echo “”;echo””;
echo””;
echo “”;echo “”;echo””;
echo””;
echo “”;}[/insert_php] Formula

EXAMPLES EXAMPLE 1EXAMPLE 2

DATA YOU ENTERED” .$a.”” .$b.”” .$c.”” .$d.”
MEAN CALCULATED FOR DATA” .$mean.”
VARIANCE CALCULATED FOR DATA” .$finalvarience.”
STANDAR DEVIATION CALCULATED FOR DATA” .$standarddeviation.”
Formula for Mean
mean = (A + B + C + D) /4
Formula for Varience of Data
VA=(A-mean)
VB=(B-mean)
VC=(C-mean)
VD=(D-mean)
sqrA= (VA*VA)
sqrB= (VB*VB)
sqrC= (VC*VC)
sqrD= (VD*VD)
Sum = sqrA + sqrB + sqrC + sqrD
Varience = Sum/4
Formula for Standard Deviation
Standard Deviation = sqrt(Varience)
ValuesMean of DataVarience Of DataStandard Deviation of Data
12, 15, 17, 1915.756.68752.5860
ValuesMean of DataVarience Of DataStandard Deviation of Data
105, 157, 193, 185160118734.4528
Prof. Fzal Rehman Shamil
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325