• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 3 páginas
Examen

Assignment 2

Document preview thumbnail
Vista previa 1 fuera de 3 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
1 de mayo de 2025
Número de páginas
3
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$8.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
303
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes