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
Windows Phone 8 camera streaming to desktop app Project Description: I require WP8 application (client) that will: 1. Automatically evaluate and connect to Windows desktop

What are the improvements made in CAS in .NET 4.0? The CAS mechanism in .NET is used to control and configure the ability of managed code. Previously, as this policy was applic

Question: (a) One of the advantages of the Session object is that it prompts to you when a user session begins. In this context, a user fills in a registration form and the Se

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"? When you compiles a program using command line, u add th

I need Game development tutorials Project Description: We need video tutorials like lynda for game development using unity. You must have developed games before and need to s

Project Description: This is an online customization printing system they use for multiple organizations to allow customizing  and access of materials they allocate to drive iss


Consuming a web service with SOAP on c# .NET Project Description: I need to consume a web service with SOAP. I have xml file and some description. I need it to be done

Google Calendar Project Description: I require to syn my Microsoft exchange calendar with the Google calendar so i will view the all the changes that happen in Microsoft exch

How does output caching work in ASP.NET?    Output caching is a powerful method that enhances request/response throughput by caching the content generated from dynamic pages. O