I have an assignment that I think I more or less understand, but I am lost on how to use functions correctly. As well, we are to include an array that I have no clue how to do.
here is the equation we need to use: x (+-) z o/sqrtN
o = standard deviation
x = sample mean
N = number of samples in the population
z = critical point for the confidence level
The most comment values of z are given below:
Confidence level p z
90% 0.05 1.645
95% 0.025 1.960
99% 0.005 2.576
(I don't know if that part is extremly relevant right now but I included it just in case)
It then says write a program to calculate the confidence interval of the following database. (then it gives 12 different numbers.)
My problem is that I have no clue how to include an array (tried it in another assignment but didn't get it). and I don't know how to properly work a function.
Anything that could get me started would be a big help. I can manage writing a skeleton for this project if I know how to go about using an array and function.
Thank you in advance