Access over 35 million academic & study documents

3 Scientist and engineers frequently perform experiments designed to

Content type
User Generated
Rating
Showing Page:
1/4
3 Scientist and engineers frequently perform experiments
designed to provide measurements of two variables X and
Y. They often compute measures of central tendency (such
as the mean) and measures of dispersion (such as
standard deviation)for these variables, and then attempt to
decide whether or not there is any relationship in terms of
an equation. If there is a relationship between X and Y that
is describe using a linear equation of the form Y = aX + b
The data collected is said to fit a linear curve. For
example, the ACE computing company made a study
relating aptitude-test scores to programming productivity of
new personnel. The 6 pairs of scores shown below were
obtained by testing 6 randomly selected applicants and
later measuring their productivity. Aptitude score
Productivity Applicant variable X Variable Y 1 X1 = 9 Y1 =
46 2 X2 = 17 Y2 = 70 3 X3 = 20 Y3 = 58 4 X4 = 19 Y4 = 66
5 X5 = 20 Y5 = 86 6 X6 = 23 Y6 = 64 ACE wants to find
the equation of the line which they can use to predict the
productivity of workers tested in the future. They are also
interested in obtaining means and standard deviations for
the variables X and Y. The required computations can be
performed as follows: 1. Compute SUMX = X1 + X2 + X3 +
......... + X6 SUMY = Y1 + Y2 + Y3 + ......... + Y6 SUMXY =
X1Y1 + X2Y2 + ......... + X6Y6 SUMXSQ = X1X1 + X2X2 +
........ + X6X6 SUMYSQ = Y1Y1 + Y2Y2 + ........ + Y6Y6 2.
Compute MEANX = SUMX/N where N is the total number of
X or Y MEANY = SUMY/N 3. Compute STDDVX = Square
root of ( SUMXSQ/N - MEANX^2) STDDVY = Square root
of ( SUMYSQ/N - MEANY^2) 4. Compute \"a\" and \"b\" in
\"Y = aX + b\" using the following equation a = (SUMXY-
N.(MEANX).(MEANY))/(SUMXSQ - N*MEANX^2) b =
MEANY - a.(MEANX) Please write a C program using your
desire operating system to calculate a and b of the option
4 above and your output should only displays \" Y = aX +
b\". Draw the flow chart.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/4
Solution
#include <stdio.h>
#include <math.h>
const int size=6;
int calSum(int n[size])
{
int total=0;
for(int i=0;i<size;i++)
total+=n[i];
return total;
}
float calMean(int n[size])
{
int total=calSum(n);
return total/size;
}
int calSumXY(int x[size],int y[size])
{
int total=0;

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/4

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
3 Scientist and engineers frequently perform experiments designed to provide measurements of two variables X and Y. They often compute measures of central tendency (such as the mean) and measures of dispersion (such as standard deviation)for these variables, and then attempt to decide whether or not there is any relationship in terms of an equation. If there is a relationship between X and Y that is describe using a linear equation of the form Y = aX + b The data collected is said to fit a linear cu rve. For example, the ACE computing company made a study relating aptitude-test scores to programming productivity of new personnel. The 6 pairs of scores shown below were obtained by testing 6 randomly selected applicants and later measuring their productivity. Aptitude score Productivity Applicant variable X Variable Y 1 X1 = 9 Y1 = 46 2 X2 = 17 Y2 = 70 3 X3 = 20 Y3 = 58 4 X4 = 19 Y4 = 66 5 X5 = 20 Y5 = 86 6 X6 = 23 Y6 = 64 ACE wants to find the equation of the line which they can use to predict the productivity of workers tested in the future. They are also interested in obtaining means and standard deviations for the variables X and Y. The required computations can be performed as f ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
I was stuck on this subject and a friend recommended Studypool. I'm so glad I checked it out!

Studypool
4.7
Indeed
4.5
Sitejabber
4.4