d_state.h:
#ifndef STATECITY_CLASS
#define STATECITY_CLASS
#include
#include
using namespace std;
// object stores the state name and city in the state
class stateCity
{
public:
stateCity (const string& name = "", const string& city = "");
// output the state and city name in the format
// cityName, stateName
friend ostream& operator<< (ostream& ostr, const stateCity& state;
// operators < and == must be defined to use with set object.
// operators use only the stateName as the key
friend bool operator< (const stateCity& a, const stateCity& b);
friend bool operator== (const stateCity& a, const stateCity& b);
private:
string stateName, cityName;
};
#endif // STATECITY_CLASS
Please write in C++
In: Computer Science
A South African mathematician, John Kerrich, was visiting Copenhagen in 1940 when Germany invaded Denmark. Kerrich was forced to spend the next five years in an internment camp, and to pass the time, he carried out a series of experiments. One such experiment involved flipping a coin 10,000 times and keeping track how many heads he obtained. Of all the 10,000 coin flips, 5067 came up heads.
a.Use the normal approximation to calculate a 95% confidence interval for the true probability of heads for Kerrich’s coin, and interpret your result.
b.Use an exact method to calculate a 95% confidence interval for the true probability of heads for Kerrich’s coin (you will need a computer), and interpret your result.
c.Compare your results from a and b. Why do the results look so similar? What would have to happen in order for these results to look substantially different?
d.Do you think the coin he used in this experiment was fair? Explain.
In: Statistics and Probability
Document 2: Lucretius On the Nature of the Universe 4.660-690 (1st C. BC)
“The sight of a rooster ... is intolerable to lions. At the first glimpse they think only of running away. The reason, of course, is that the rooster's body contains certain atoms which, when they get into the lion's eyes, prick the eyeballs and cause acute pain, so that even their bold spirits cannot long endure it. But these atoms have no power to hurt our own eyes, either because they never get in at all or because, once in, they have a clear way out, so that they do not hurt the eyeball by meeting obstruction at any point.”
13. What experiment could someone in antiquity have performed to test this theory about the cause of lions running away from roosters? (400 words maximum. Keep in mind what we learned last term about the technologies that were available in antiquity. Assume that the person performing the experiment is quite wealthy so cost is not an issue.)
In: Biology
A lady claimed that she is able to tell whether the tea was added first or the milk was added first to a cup. To test this idea, a statistician proposed to give her ten cups of tea, each made in random order (tea first or milk first) without telling her which is which. Assume each cup is independent. Let X equal to the number of cups that the lady identified correctly.
(a) Suppose that she is just randomly guessing, with a 50-50 percent chance. Find P(X = 7) .
(b) Suppose again that she is randomly guessing, with a 50-50 percent chance. This experiment will be stopped early if she cannot correctly identify at least one cup among the first three cups. What is the probability that this experiment continues beyond three cups?
(c) Suppose she is indeed able to tell 9% of the time. Find the probability she correctly identifies at least 7 cups.
In: Statistics and Probability
Psychologists have studied the effect of the working environment or surroundings on the quality and quantity of work done. Many businesses have music piped into the work area to improve the environment. An experiment is performed to determine which type of music is best suited for a particular company. Three types of music, country, rock, and classical, are tried, each on four randomly selected workdays. The productivity is measured by recording the number of items produced on each of the four days. The results are shown in the table.
| Country | Rock | Classical |
|---|---|---|
| 857 | 791 | 824 |
| 801 | 753 | 847 |
| 795 | 781 | 881 |
| 842 | 842 | 842 |
SST=18056.250SST=18056.250
(a) State the assumptions required to analyze this data using ANOVA.
(b) Construct an ANOVA table for this experiment.
(c) Can we conclude that the mean number of items produced differ for three types of music? State appropriate null and alternative hypotheses and test at α=0.05α=0.05.
In: Statistics and Probability
A math class consists of 28 students, 13 female and 15 male. Three students are selected at random, one at a time, to participate in a probability experiment (selected in order without replacement). (a) What is the probability that a male is selected, then two females? (b) What is the probability that a female is selected, then two males? (c) What is the probability that two females are selected, then one male? (d) What is the probability that three males are selected? (e) What is the probability that three females are selected? A math class consists of 28 students, 13 female and 15 male. Three students are selected at random, one at a time, to participate in a probability experiment (selected in order without replacement). (a) What is the probability that a male is selected, then two females? (b) What is the probability that a female is selected, then two males? (c) What is the probability that two females are selected, then one male? (d) What is the probability that three males are selected? (e) What is the probability that three females are selected?
In: Statistics and Probability
A large company is conducting an experiment to determine if a new mental training program will benefit worker productivity. Because the company has a large number of employees it is more cost effective to randomly select employees to participate in the training program. Thirty-six employees are randomly se- lected for the experiment, with twenty employees assigned to the new program and the remainder assigned to the placebo. The company determine the scores for each group and notices there are no outliers within either group. The group receiving the new training has a mean productivity time of 72.26 minutes with a standard deviation of 20.80 minutes while the placebo group has a mean pro- ductivity time of 86.44 minutes with a standard deviation of 26.20 minutes. Due to the cost of retraining all employees, the company would like to be certain the program is working; therefore they are only willing to risk being wrong 1% of the time. Is the program working? Construct a 98% estimate for the difference in the two programs.
In: Statistics and Probability
A large company is conducting an experiment to determine if a new mental training program will benefit worker productivity. Because the company has a large number of employees it is more cost effective to randomly select employees to participate in the training program. Thirty-six employees are randomly se- lected for the experiment, with twenty employees assigned to the new program and the remainder assigned to the placebo. The company determine the scores for each group and notices there are no outliers within either group. The group receiving the new training has a mean productivity time of 72.26 minutes with a standard deviation of 20.80 minutes while the placebo group has a mean pro- ductivity time of 86.44 minutes with a standard deviation of 26.20 minutes. Due to the cost of retraining all employees, the company would like to be certain the program is working; therefore they are only willing to risk being wrong 1% of the time. Is the program working? Construct a 98% estimate for the difference in the two programs.
In: Statistics and Probability
1. write a hypothesis for this chart?
|
Data Table 3 |
Graphical Data |
Percentage calculations |
|||
|
Generation number |
Number of Long-tail Rabbits |
Number of Short-tail Rabbits |
Total Rabbits |
% Long-tail Rabbits |
% Short-tail Rabbits |
|
2 |
2 |
54 |
56 |
3.57% |
96.42% |
|
4 |
2 |
488 |
490 |
.40% |
97.6% |
|
7 |
0 |
13 |
13 |
0% |
100% |
|
10 |
0 |
3 |
3 |
0% |
100% |
. Restate your hypothesis here:
4. Does the data in the table above support your hypothesis for this experiment? Be sure to use
your data in explaining whether the hypothesis was supported or not.
5. Explain how the tail length trait was influenced by natural selection in your experiment.
If you could not discover this from the simulation, propose a possible situation where a long tail would provide a
selective advantage for bunnies and explain WHY it would be an advantage.
In: Biology
A classic experiment in equilibrium studies dating from 1862 involved the reaction in aqueous solution of ethanol and acetic acid to produce ethyl acetate and water.
C2H5OH (aq) + CH3COOH (aq) <---> CH3COOC2H5 (aq) + H2O (l)
The reaction can be followed by analyzing the equilibrium mixture for its acetic acid content using a titration with Ba(OH)2 as shown below:
2CH3COOH (aq) + Ba(OH)2 (aq) ---> Ba(CH3COO)2 (aq) + 2H2O (l)
In one experiment, a mixture of 1.000 moles acetic acid and 0.5000 moles ethanol is brought to equilibrium in a 1.000 L flask. A 20.00 mL sample of the equilibrium mixture requires 56.74 mL of 0.1000 M Ba(OH)2 for its titration.
What is the concentration of the acetic acid found in the titration?
What is the mass action expression for the reaction of ethanol and acetic acid?
What is the value of the equilibrium constant for the reaction of ethanol and acetic acid?
In: Chemistry