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
The ADO.NET gives the SqlCommand object which gives the functionality of executing the stored procedures. CREATE PROCEDURE SelectByEmployee @FirstName nvarchar(200) AS Se

Bug Correction and Prediction Project Description: The project is about the prediction of bugs and resolves the bug in the sample program using costriage algorithm. You have

Project Description: We need to construct services in C# or VB.NET that can manipulate with a Targin TIP Protocol Server (protocol for financial information exchange), receive d

Project Description: customise samba pos. Just remove samba pos logo and rebrand it. The title in the frame needs to be changed as well as the splash screen at the beginning.

A CRM based on .net and Oracle as backend with import data, Transaction Reporting and management Capabilities Project Description: 1. Introduction ADA recovery Branch gets

I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

What is a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data

Project Description: i will testing some software which you need and i promise to do my job is the best way, and as fast as possible. Skills required: .NET, MySQL, C# P

How can you implement a condition in a workflow? You can implement a condition by using either of the following ways: By creating a rule condition - Specifies that you can e

What are code contracts? Code contracts help you to state the code assumptions and statements stating the behavior of your code in a language-neutral way. The contracts are con