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
1. What are the limitations of file based data storing techniques?

What is difference between System.String and System.StringBuilder classes? String and StringBuilder classes are used to store string values but the dissimilarity in them is tha

Define XPATH. XPATH is an XML query language to select specific section of an XML document. By using XPATH you can address or filter elements and text in a XML document. For il

SOAP Web Services A SOAP Web Service that supports three operations: add a bibliography entry, delete a bibliography entry and list all bibliography entries. You may design fo

Web-App Developer for Startup Project Description: I am seeking someone who is good at building dynamic sites that will run on both desktops and tablets. The core of the w

Connect a Software Application to a Database Backend Acquire the knowledge and develop the skills needed to prototype an end user application using a rapid application dev

create a table using class file

Project Description: We are seeking experienced .NET developers (possibly certified) to work with us on several future projects. You will have to pass a simple test to be consid

What is a node? A network can have of two or more computers directly linked by some physical medium such as coaxial cable or optical fiber. Such a physical medium is known as L

How can we implement singleton pattern in .NET ? The Singleton pattern basically focuses on having one and only one instance of the object running. Lets take an e.g. a windows