C++; arrays and standard devation/variance?

  • Context: Comp Sci 
  • Thread starter Thread starter mathman44
  • Start date Start date
  • Tags Tags
    Arrays Standard
Click For Summary
SUMMARY

The discussion centers on calculating standard deviation and variance in C++ arrays. The existing code successfully prints the mean, count of data points, minimum, and maximum values of the array input. However, the user seeks guidance on implementing the calculations for standard deviation and variance. The solution involves utilizing mathematical formulas for these statistics within the C++ programming environment.

PREREQUISITES
  • Understanding of C++ programming language
  • Familiarity with arrays in C++
  • Basic knowledge of statistical concepts such as mean, variance, and standard deviation
  • Experience with mathematical operations in programming
NEXT STEPS
  • Implement standard deviation calculation in C++ using the formula: sqrt(sum((x - mean)^2) / n)
  • Research variance calculation methods in C++
  • Explore C++ libraries that facilitate statistical calculations, such as the cmath library
  • Learn about debugging techniques to verify statistical outputs in C++
USEFUL FOR

Students, software developers, and data analysts looking to enhance their C++ programming skills, particularly in statistical analysis and data processing.

mathman44
Messages
204
Reaction score
0
---

Found solution. Nvm.
 
Last edited:
Physics news on Phys.org
what does it print?
What did you expect it to print?
 
The code works fine as is; it prints the mean, # of data, min and max of the array input. I just don't know how to make it also "count" the std devation and variance of the input.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
6K