This is the formula for the standard normal deviate z, used in statistical appli
ID: 3636052 • Letter: T
Question
This is the formula for the standard normal deviate z, used in statistical application:z = (x-u)/ s
x is a single value.
U refers to a mean value.
s Refers to a standard deviation.
Using formula, write a program that calculates and displays the value of the standard normal deviate when X= 85.3, u= 80, s=4.
a. For this programming problem, how many outputs are required?
b. How many inputs does this problem have?
c. Write an algorithm for converting the input items into output items.
d. Test the algorithm written for Exercise 8c, using the data given in the problem.
Explanation / Answer
a. There is only ONE output, standard normal deviate ' z'.
b. There are THREE inputs -
1. single value 'x', 2. mean value 'u', 3. standard deviation 's'.
c. ALGORITHM
This algorithm inputs co-efficient 'x', 'u', 's'.
take single value as 'x', mean value as 'u', standard deviation as 's' and standard normal deviate as ' z'.
STEP 1. Read the values of x,u,s.
STEP 2. SET z=(x-u)/s.
as mentioned in formula.
STEP 3. Print output of standard normal deviate ' z'.
STEP 4. End
d. Appling Algorithm
#include <iostream.h> //header
main()
{
int u=80,s=4 ; // This line declare two integer variables mentioned in the question.
float x=85.3,z; // as x and standard normal deviate in fraction .
z=(x-u)/s; //compute the result using the formula.
cout<<"Standard Normal Deviate "<<z ; //print the output.
return 0; // ALWAYS end programs and functions with return.
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.