100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

Assignment 2

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
01-05-2025
Written in
2024/2025

write the definition of a function twice, that receives an integer parameter and returns an integer that is twice the value of that parameter -correct answer_int twice(int input) { return input*2; } write a statement that declares a prototypes for the function add which has 2 int parameters and returns an int -correct answer_int add(int, int); Write the definition of a function isPositive , that receives an integer parameter and returns true if the parameter is positive, and false otherwise. -correct answer_bool Is Positive(int x){ if (x 0) { return true; } else { return false; } } Write the definition of a function min that has two int parameters and returns the smaller. -correct answer_int min (int a, int b){ if (ab){ return a; } else { return b; } } Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer variable min. Assume that all the variables have already been declared and that x, y, and z been assigned values ). -correct answer_if(x y){ if(xz){ min = x; }else{ min = z; } }else{ if(yz){ m have in = y; }else{ min = z; } } Write an if/else statement that adds 1 to the

Show more Read less
Institution
Course

Content preview

Assignment 5
Ho: p = 0.75 Ha: p > 0.75 -correct answer_For the following situation, state the null and
alternative hypotheses. Testing to see if there is evidence that a proportion is greater
than 75 %. ρ < 0 -correct answer_If the results of the test with the following hypotheses
are statistically significant, we have found evidence that: Hypotheses: Ho: ρ = 0 & Ha: ρ <
0 Ho: μ1 = μ2 Ha: μ1 ≠ μ2 -correct answer_State the null and alternative hypotheses for
the statistical test described below. Testing to see if there is evidence that the mean of
group 1 is not the same as the mean of group 2. Ho: p1 = p2 Ha: p1 > p2 -correct
answer_State the null and alternative hypotheses for the situation described below for a
statistical test. Testing to see if there is evidence that the proportion of people who
smoke is greater for males than for females. Let group 1 be the males and let group 2 be
the females. Ho: μ = 50 Ha: μ > 50 -correct answer_A dataset contains a sample of
patients admitted to a hospital Intensive Care Unit (ICU). For the research question
below, state the appropriate null and alternative hypotheses. Is the average age of ICU
patients at this hospital greater than 50? Ho: μ1 = μ2 Ha: μ1 ≠ μ2 -correct answer_For a
random sample of households in the US, we record annual household income, whether
the location is east or west of the Mississippi River, and number of children. We are
interested in determining whether there is a difference in average household income
between those east of the Mississippi and those west of the Mississippi. (a) State the
null and alternative hypotheses. Let group 1 be the households east of the Mississippi
River and let group 2 be the households west of the Mississippi River. x 1 - x 2 -correct
answer_For a random sample of households in the US, we record annual household
income, whether the location is east or west of the Mississippi River, and number of
children. We are interested in determining whether there is a difference in average
household income between those east of the Mississippi and those west of the
Mississippi. (b) What statistic(s) from the sample would we use to estimate the
difference? Let group 1 be the households east of the Mississippi River and let group 2 be
the households west of the Mississippi River. Ho: μ = 3800 Ha: μ > 3800 -correct
answer_Studies have shown that omega-3 fatty acids have a wide variety of health
benefits. Omega-3 oils can be found in foods such as fish, walnuts, and flaxseed. A
company selling milled flaxseed advertises that one tablespoon of the product contains,
on average, at least 3800 mg of ALNA, the primary omega-3. (a) The company plans to
conduct a test to ensure that there is sufficient evidence that their claim is correct. To be
safe, they want to make sure that evidence shows the average is higher than 3800 mg.
What are the null and alternative hypotheses? Ho: μ = 3800 Ha: μ < 3800 -correct
answer_Studies have shown that omega-3 fatty acids have a wide variety of health
benefits. Omega-3 oils can be found in foods such as fish, walnuts, and flaxseed. A
company selling milled flaxseed advertises that one tablespoon of the product contains,
on average, at least 3800 mg of ALNA, the primary omega-3. (b) Suppose, instead, that a
consumer organization plans to conduct a test to see if there is evidence against the
claim that the product contains an average of 3800 mg per tablespoon. The consumer
organization will only take action if it finds evidence that the claim made by the company
is false, and that the actual average amount of omega-3 is less than 3800 mg. What are
the null and alternative hypotheses? Ho: p1 = p2 Ha: p1 ≠ p2 -correct answer_When
getting voters to support a candidate in an election, is there a difference between a
recorded phone call from the candidate or a flyer about the candidate sent through the
mail? A sample of 400 voters is randomly divided into two groups of 200 each, with one
group getting the phone call and one group getting the flyer. The voters are then
contacted to see if they plan to vote for the candidate in question. We wish to see if there
is evidence that the proportions of support are different between the two methods of
campaigning. (See: https://imgur.com/Upk6bBJ) (a) State the null and alternative
hypotheses. Let group 1 be the supporters of Candidate A after a phone call and let group
2 be the supporters of Candidate A after a flyer. p̂1 = .645 p̂2 = .59 Yes -correct

Written for

Course

Document information

Uploaded on
May 1, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
SebastianRocky

Get to know the seller

Seller avatar
SebastianRocky Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
9 months
Number of followers
0
Documents
303
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions