answersLogoWhite

0


Best Answer

Type your answer here...

#include

#include

#define NULL 0

FILE*scores;

main()

{

int scores[50];

int numberOfScores = 0;

/*Function Definitions*/

void readFile (int a[], &int);

void calculateMean (int a[]);

void sortArray (int a[], int);

void calculateMedian (int a[]);

void calculateMode (int a[]);

}

/*Read the file with scores*/

void readFile (int a[], &numberOfScores);

{

int flag = TRUE;

scoresFile = fopen("scores.txt","r");

if(scoresFile multi[k][0]

{

multi[k][1] = multi[k][1] + 1;

}

}

}

higher = multi[0][1];

for(j=0; j<50; j++)

{

if(higher , multi[j][1])

higher= multi[j][1]l

}

printf("Mode of the scores: %d", higher);

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find weighted arithmetic mean?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is an arithmetic mean a weighted mean or a weighted mean an arithmetic mean?

The arithmetic mean is a weighted mean where each observation is given the same weight.


Is there any difference between expected value and arithmetic mean?

There is. Arithmetic mean is simple average of numbers not weighted by anything. However in EV, the numbers are weighted by their probability


Is it the arithmetic mean or weighted mean that is more accurate Why?

The arithmetic mean and the weighted mean are used in different situations. The arithmetic mean is used in frequencies as a general average. The weighted mean is used when different factors contribute to some kind of total for example with weighted index numbers. It is not a matter of accuracy it involves using the right mean in the right situation. Almost always (if not always) a question will specify which mean to use.


The weighted mean is a special case for?

The weighted mean is simply the arithmetic mean; however, certain value that occur several times are taken into account. See an example http://financial-dictionary.thefreedictionary.com/weighted+average


C program weighted arithmetic mean using c program?

double weightedmean (double runningaverage, double rawdata, double timeconstant) { return runningaverage / (1 - 1/timeconstant) + rawdata / (1/timeconstant); }


What are the uses of Arithmetic Mean?

The arithmetic mean is used in fields like statistics and economics. The arithmetic mean is the average of a group of numbers. It can be used to find test averages for students and in sports to find player averages


What is arithmetic mean and geometric mean?

The difference between arithmetic and geometric mean you can find in the following link: "Calculation of the geometric mean of two numbers".


What does weighted average mean?

The weighted arithmetic mean is used, if one wants to combine average values from samples of the same population with different sample sizes: : The weights wi represent the bounds of the partial sample. In other applications they represent a measure for the reliability of the influence upon the mean by respective values. rhinostar


What is the difference between geometric mean and arithmetic mean?

The difference between arithmetic and geometric mean you can find in the following link: "Calculation of the geometric mean of two numbers".


Write a program to determine the weighted arithmetic mean using C language?

#includevoid mean(int[],int);void main(){int n,a[24];printf("Enter the number of terms to find mean\n");scanf("%d",&n);printf("Enter the numbers\n");for(i=0;i


Explain the difference between arithmetic mean and weighted mean?

The plain arithmetic mean is actually a special case of the weighted mean, except all the weights are equal to 1. The arithmetic mean is the sum of all the individual observations divided by the number of observations. With a weighted mean you multiply each observation by a weight, add those values together and then divide by the sum of the weights. E.g. Let's say you have 3 observations: 4, 7, 12 The arithmetic mean is (4+7+12) / 3 = 23/3 = 7.67 Now let's assume that you want to weight the first observation by a factor of 10, the second observation by a factor of 5 and the third observation by a factor of 2: The weighted mean is (4x10+7x5+12x3) / (10+5+2) = 111/17 = 6.53 You can see that if all the weights were 1 you would have the arithmetic mean shown above. As it is mentioned above arithmetic mean is a special case of weighted mean. In the calculation of arithmetic mean all the observations are given an equal chance of occurance ie the above mentioned problem can be written as 4*1/3+7*1/3+12*1/3=7.67 or inother words 7.67 is the number it takes if all are given equal chance whereas in weighted mean the chance of occurance are not equal .This can be written as 4*10/17+7*5/17+12*2/17=6.53 in the above eg. 4 has given more weightage than 7 and 12 has the least weightage so the probability of 4 occurring is more when compared to 7 and 12 there fore the average obtained is seen to decrease as we have given more importance to 4 than others. It shows that the average is affected by the weightage given to the numbers


What does histogram find out graphically arithmetic mean or median or mode or harmonic mean?

mode