473,396 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Functions and Arrays (C)

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
Apr 1 '08 #1
2 1613
Meetee
931 Expert Mod 512MB
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
I have some doubts regarding your problem statement. The equation given (x (+-) z o/sqrtN ) is to find confidence interval? Anyways if it is so and numbers given in database gives the value of N then you can take the array of N and can store the values in that array.

I think you have not given the complete statement but still you can make a function with parameters passed to find the ultimate equation value.

Hope it helps!
Regards
Apr 1 '08 #2
sicarie
4,677 Expert Mod 4TB
I'd also recommend the cplusplus.com's data type tutorial as well as their functions tutorial .
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
10
by: Pete | last post by:
Can someone please help, I'm trying to pass an array to a function, do some operation on that array, then return it for further use. The errors I am getting for the following code are, differences...
20
by: J de Boyne Pollard | last post by:
MThe library functions which are included to allow process Mlaunch, forking, and termination, imply that it is both Mpossible and desirable for a process to fork itself. This is Ma fundamental...
0
NeoPa
by: NeoPa | last post by:
Many of us have noticed that there are some very useful functions available to you when using Excel, but these same functions are not available, as standard, in Access. A particular issue I had...
127
by: sanjay.vasudevan | last post by:
Why are the following declarations invalid in C? int f(); int f(); It would be great if anyone could also explain the design decision for such a language restricton. Regards, Sanjay
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.