Calculate standard deviation - c# program, DOT NET Programming

Calculate Standard Deviation - C# Program

Hello i am unable to find the code for Calculate Standard Deviation in c#. Can anybody please provide me the assignment help?

Posted Date: 2/12/2013 12:51:17 AM | Location : United States





Try this :

using System;  

class StdDeviation

{

  public static void Main()

 {

   float [] nos = {3.5F,57,2,6,24,14,95,23,74,23};

   int n = nos.Length;

   float sum = 0.0F,sumofsq = 0.0F, mean;

   double deviation;  

  Console.Write("Array List consists of : ");    

   for (int i = 0; i < n; i ++)

  {

   Console.Write(nos[i] + " ");

  }  

   for (int i = 0; i < n; i ++)

  {

   sum = sum + nos[i];

  }    

   for (int i = 0; i < n; i ++)

  {

   sumofsq = sumofsq + (nos[i]*nos[i]);

  }  

  mean = sum / n;

  deviation = Math.Sqrt(sumofsq / 8.0);  

  Console.WriteLine("\n\n Sum = " +sum);

  Console.WriteLine("\n Mean = " +mean);

  Console.WriteLine("\n Deviation = " +deviation );

  Console.ReadLine();

 }

}

Posted by Robert | Posted Date: 2/12/2013 12:54:11 AM

Hi. Thank you for this example. I look forward to going through your other program codes. I''ve been trying to look up this kind of stuff on the? web and its a pain. Thank you for your expert Advice.

Posted by isbell | Posted Date: 2/12/2013 12:54:51 AM


Related Discussions:- Calculate standard deviation - c# program, Assignment Help, Ask Question on Calculate standard deviation - c# program, Get Answer, Expert's Help, Calculate standard deviation - c# program Discussions

Write discussion on Calculate standard deviation - c# program
Your posts are moderated
Related Questions
What is Language Integrated Query (LINQ)? LINQ is a programming model that is the composition of general-purpose standard query operators that permit you to work with data, reg

What is Object Oriented Programming? This is a problem solving process to develop software systems. This is a technique to think real world in terms of objects. The Object maps

Differentiate between the while and for loop in C#. The while and for loops are used to implement those units of code that require to be repeatedly executed, unless the result

This assignment is based on lectures, tutorials, computer labs and research work. 1. Background During the lectures and tutorials on business process modeling and business

What are the differences between ASP and ASP .Net ?  ASP: Code is Interpreted ASP.NET: Code is Compiled   ASP: Business Logic and Presentation Logic are in a one

List the new features added in .NET Framework 4.0. The following are the latest features of .NET Framework 4.0:     Improved Application Compatibility and Deployment Support

Djvu view and setup,  sourcecode with nice UI Project Description: i want an application build for viewing djvu files -must include setup -must include source code -

What are the ways to implement locking in ADO.NET? There are many ways to implement locking using ADO.NET which are shown below:- 1)Whenever we call "Update" method of DataA

31: Need to develop Doctor Appointments application in .NET Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking doctors and

What is a Manifest?  An assembly manifest have all the metadata needed to specify the assembly's version requirements and security identity, and all metadata required to define