If n = 240 and ˆ p (p-hat) = 0.7, construct a 99% confidence interval. Give your answers to three decimals
< p <
In: Math
A dam was proposed to be built on a certain river in a natural setting that would produce hydroelectric power and create recreational activities, such as boating, swimming, and water-skiing. The only problem, as environmentalists see it, is that there is a certain species of fish found only in this river that will become extinct if the dam is built. The fish is not used for food or sport; in fact, no one knows what purpose it serves by being in the river. Should the dam be built or not? Why or why not? Would it make a difference to your answer if the small fish were a good food fish or could be used in some other commercial way, or is its extinction sufficient reason to not build the dam? Use at least one ethical theory.
In: Psychology
(5)When you pass an array to a function, the function
receives
Group of answer choices
a copy of the array
a reference to the array
the data type of the array and the number of elements it contains
the data type of the array and a pointer to its first element
(6)Which of the following statements is not true about a built-in
array?
Group of answer choices
Elements that aren’t initialized will be assigned default values.
Its elements must have the same data type.
The number of elements is fixed.
The number of elements must be set at compile time.
(7)Code Example 12-1
const int size = 6;
int ages[size] { 37, 26, 42, 49, 53, 34 };
(Refer to Code Example 12-1.) What statement would you use to store
a pointer to the first element in the built-in array in a variable
named ptr?
Group of answer choices
int ptr = ages;
auto ptr = ages;
int ptr = ages.begin();
auto ptr = ages.begin();
(8)Which of the following statements is not true about a
two-dimensional array?
Group of answer choices
It can be thought of as a table of rows and columns.
You can’t define and initialize it at the same time.
You use two subscript operators to refer to its elements.
You can use it with C strings if you need to access individual characters.
(9)You may not want to use range-based for loops with built-in
arrays because
Group of answer choices
built-in arrays don’t have a size() member function
you don’t typically need to operate on every element in a built-in array
range-based for loops don’t work correctly with built-in arrays that are passed to functions
it’s easier to use a counter with a for loop
In: Computer Science
For a population at Hardy-Weinberg equilibrium, what is the frequency of heterozygotes if p = 0.8?
In: Biology
2. Student pricing at the movie theater is a common example of third degree price
discrimination. What is it about students, as compared to everyone else, that makes
movie theaters want or need to charge them a lower price? Why is it important for
movie theaters to make students show their IDs? Additionally, suppose a student could
buy as many tickets as they wanted with their ID. How might that limit the theater’s
ability to charge two drastically different prices for students and non-students?
In: Economics
In a home theater system, the probability that the video components need repair within 1 year is 0.02, the probability that the electronic components need repair within 1 year is 0.005, and the probability that the audio components need repair within 1 year is 0.004. Assuming that the events are independent, find the following probabilities. (Round your answers to four decimal places.)
(a) At least one of these components will need repair within 1
year
(b) Exactly one of these component will need repair within 1
year
In: Statistics and Probability
Given numRows and numCols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Ex: numRows = 2 and numCols = 3 prints:
1A 1B 1C 2A 2B 2C
#include
int main(void) {
int numRows = 2;
int numCols = 3;
// Note: You'll need to declare more variables
/* Your solution goes here */
printf("\n");
return 0;
}
In: Computer Science
You are given the sample mean and the population standard deviation. Use this information to construct the 90% and 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. If convenient, use technology to construct the confidence intervals. A random sample of 50 home theater systems has a mean price of $149.00. Assume the population standard deviation is $18.70.
Construct a 90% confidence interval for the population mean. The 90% confidence interval is ( _____, ______). (Round to two decimal places as needed.)
In: Statistics and Probability
Rainfall rates for successive 20-min periods of a 140-min storm are 1.5, 1.5, 6.0, 4.0, 1.0, 0.8, and 3.2 in/hr, totaling 6.0 in. Determine the rainfall excesses for successive periods by the Green-Ampt model and then report the cumulative storm runoff [in] below. Assume a saturate hydraulic conductivity of 0.8 in/hr, a porosity of 0.62, an initial moisture content of 0.28, and an average capillary suction of 7.2 in. The depression storage is 0.5 in.
In: Civil Engineering
Overview
For this program, add code to program 2 that will (potentially) allow for a discount to be applied to the cost of the tickets to the movie theater.
Basic Program Logic
The program should start the same as program 2 by asking the user for the number of tickets to purchase for adult and children.
The program should then ask the user if they have a discount coupon. This is a string value. A value of "Y" indicates the user does have a coupon. Any other value indicates the user does not have a coupon.
If the user does have a discount coupon, ask if the coupon is for a free adult ticket or free child ticket. This is also a string value. A value of "A" is for a free adult ticket which means that a discount of 11.25 should be applied to total purchase. A value of "C" is for a free child ticket which means that a discount of 4.50 should be applied to the total purchase. Any other value is invalid which means that no discount should be applied to the total purchase. If an invalid discount type is selected, display a message to the user that their discount type is not valid and that no discount will be applied.
Calculate the user's total purchase amount, making sure to apply the appropriate discount amount (11.25, 4.50, or 0.00).
Finally, display the results similar to program 2: the number of adult tickets that were purchased, the number of child tickets that were purchased, the discount amount (if a discount was applied to the purchase), and the total purchase amount. The discount amount should ONLY be displayed if the user indicated they had a discount coupon. As with program 2, use setw to line up the last digit of the displayed values and setprecision to display 2 digits after the decimal point.
Program Requirements
At the top of the C++ source code, include a documentation box that resembles the one from programs 1 and 2.
The dollar amounts should all be displayed with exactly 2 digits after the decimal point, including zeros.
The numeric values read in from the user should all be integer values. The discount values read in from the user should all be string values. Use meaningful variable names.
Make sure and test the program with values other than those in the sample output.
Output
A few runs of the program should produce the following results:
Run 1
Enter the number of adult tickets that are being purchased: 2
Enter the number of child tickets that are being purchased: 5
Do you have a discount coupon (Y for yes)? Y
Is the discount for an adult or child's ticket (A for adult, C for child)? C
************************************
Theater Sale
************************************
Number of adult tickets: 2
Number of child tickets: 5
Discount: 4.50
Total purchase: 40.50
Run 2
Enter the number of adult tickets that are being purchased: 1
Enter the number of child tickets that are being purchased: 2
Do you have a discount coupon (Y for yes)? n
************************************
Theater Sale
************************************
Number of adult tickets: 1
Number of child tickets: 2
Total purchase: 20.25
Run 3
Enter the number of adult tickets that are being purchased: 2
Enter the number of child tickets that are being purchased: 2
Do you have a discount coupon (Y for yes)? Y
Is the discount for an adult or child's ticket (A for adult, C for child)? S
Error: S is not a valid discount type. No discount will be applied
************************************
Theater Sale
************************************
Number of adult tickets: 2
Number of child tickets: 2
Discount: 0.00
Total purchase: 31.50
Run 4
Enter the number of adult tickets that are being purchased: 4
Enter the number of child tickets that are being purchased: 2
Do you have a discount coupon (Y for yes)? Y
Is the discount for an adult or child's ticket (A for adult, C for child)? A
************************************
Theater Sale
************************************
Number of adult tickets: 4
Number of child tickets: 2
Discount: 11.25
Total purchase: 42.75In: Computer Science