100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Assignment 2

Beoordeling
-
Verkocht
-
Pagina's
3
Cijfer
A+
Geüpload op
01-05-2025
Geschreven 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

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

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

Geschreven voor

Vak

Documentinformatie

Geüpload op
1 mei 2025
Aantal pagina's
3
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$8.99
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
SebastianRocky

Maak kennis met de verkoper

Seller avatar
SebastianRocky Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
9 maanden
Aantal volgers
0
Documenten
303
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen