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 );




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
Newly designed APK file for XBMC on an Android TV Box Project Description: We are seeking someone to have knowledge in Android's operating platform. We are a business that ma

What are design patterns? The Design patterns are recurring solution to the recurring problems in the software architecture. There are 3 basic classification of patterns Behavi

Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain

Define an array. An array is explained as a homogeneous collection of elements, stored at contiguous memory locations, which can be referred by the similar variable name. All t

What is Dataset object ? The DataSet gives the basis for the disconnected storage and manipulation of the relational data. We fill it from theĀ  data store, work with it while d

Work on different coding using visual studio 2012/2013 writing Java script as well as C# codes. Project Description: I want to shift to new Programming Env. and I would like

What is serialization, how it works in .NET? Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. S

Social Media project Project Description: It's a Windows Phone application which requires the subsequent capabilities: -Live Video Streaming -Social Networking capabili

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

What is pareto principle? The Pareto principle also paraphrased as 80/20 principle is simple effective problem tackling way in the management. It says that 20% of your problems