Message 1 of 2
Help needed with Statistics Interview Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I'm having trouble understanding the answer to a statistics interview question from here. I'm trying to find the mean of a given set of data, and I'm not sure how to use the given code to calculate the mean.
The code I'm using is as follows:
int mean(int n, int x[])
{
int sum = 0;
for (int i = 0; i < n; i++)
sum += x[i];
return sum/n;
}
I'm not sure how to use this code to calculate the mean of the given set of data. Any help would be greatly appreciated.
Thank you!