# Variance and Standard Deviation

• (3 Pages)
• 1
• 2
• 3

## 33 Replies - 103534 Views - Last Post: 15 June 2019 - 05:14 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=20885&amp;s=58f11266460a28ddbd6c49865970d34c&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #31 Rolf99

Reputation: 1
• Posts: 16
• Joined: 18-October 06

## Re: Variance and Standard Deviation

Posted 17 November 2006 - 10:58 AM

BitByte, on 17 Nov, 2006 - 07:11 AM, said:

C++ Faq Lite

You might want to have a read through that site, it's interesting.

You should also have a read on Bjarne Stroustrups homepage:

Bjarnes Homepage

Thaks,
an interesting solution with "using std::cout". I should try it, to avoid confusion or ambiguity, as they say. But knowing the names in the std library, would also be of use, to avoid double names. Unique names that I converted from your vector example like NameOfArray (I did it just to understand well, the concept of vectors, and saved it separatly) could be far from ambiguity. I should test both ways carefully before it's too late. Generaly clean is clean and clean code will almost never cause unwanted results. The learning effect from own mistakes could be the best teacher, but it's a long long road. I bookmarked Bjarnes Homepage, thanks again.

Rolf

This post has been edited by Rolf99: 17 November 2006 - 12:35 PM

Reputation:

## Re: Variance and Standard Deviation

Posted 03 April 2010 - 11:13 PM

See an implementation for SUM (sum), AVG (average), MIN (minimum), MAX (maximum), STDEV (standard deviation), and VAR (variance) here:

http://mycodelog.com...7/c-aggregates/

### #33 impactidris

Reputation: 0
• Posts: 1
• Joined: 14-June 19

## Re: Variance and Standard Deviation

Posted 14 June 2019 - 09:30 PM

### #34 CTphpnwb

• D.I.C Lover

Reputation: 3822
• Posts: 13,915
• Joined: 08-August 08

## Re: Variance and Standard Deviation

Posted 15 June 2019 - 05:14 AM

If you're going to think at all about std::cout then it seems to me that you should be obsessed with USING FUNCTIONS at least, or possibly classes. The OP has written a list of instructions, not a program! Let's see some structure in the code.