In python,
Here's some fake data.
df = {'country': ['US', 'US', 'US', 'US', 'UK', 'UK',
'UK'],
'year': [2008, 2009, 2010, 2011, 2008, 2009,
2010],
'Happiness': [4.64, 4.42, 3.25, 3.08, 3.66, 4.08,
4.09],
'Positive': [0.85, 0.7, 0.54, 0.07, 0.1, 0.92,
0.94],
'Negative': [0.49, 0.09, 0.12, 0.32, 0.43, 0.21,
0.31],
'LogGDP': [8.66, 8.23, 7.29, 8.3, 8.27, 6.38,
6.09],
'Support': [0.24, 0.92, 0.54, 0.55, 0.6, 0.38,
0.63],
'Life': [51.95, 55.54, 52.48, 53.71, 50.18, 49.12,
55.84],
'Freedom': [0.65, 0.44, 0.06, 0.5, 0.52, 0.79, 0.63,
],
'Generosity': [0.07, 0.01, 0.06, 0.28, 0.36, 0.33,
0.26],
'Corruption': [0.97, 0.23, 0.66, 0.12, 0.06, 0.87,
0.53]}
I have a list of happiness and six explanatory vars.
exp_vars = ['Happiness', 'LogGDP', 'Support', 'Life', 'Freedom',
'Generosity', 'Corruption']
1. Define a variable called explanatory_vars that contains the list of the 6 key explanatory variables
2. Define a variable called plot_vars that contains Happiness and each of the explanatory variables. (Hint: recall that you can concatenate Python lists using the addition (+) operator.)
3. Using sns.pairplot, make a pairwise scatterplot for the WHR data frame over the variables of interest, namely the plot_vars. To add additional information, set the hue option to reflect the year of each data point, so that trends over time might become apparent. It will also be useful to include the options dropna=True and palette='Blues'.
In: Computer Science
Consider this :
For example, if the bicycle owners don’t bother to lock their bikes or use only a flimsy lock, the bicycle is much more likely to be stolen than if they use a secure lock. Similar examples arise in other sorts of insurance. In the case of health insurance, for example, the consumers are less likely to need the insurance if they take actions associated with a healthy lifestyle. We will refer to actions that affect the probability that some event occurs as taking care. When it sets its rates the insurance company has to take into account the incentives that the consumers have to take an appropriate amount of care. If no insurance is available consumers have an incentive to take the maximum possible amount of care. If it is impossible to buy bicycle-theft insurance, then all bicyclists would use large expensive locks. In this case the individual bears the full cost of his actions and accordingly he wants to “invest” in taking care until the marginal benefit from more care just equals the marginal cost of doing so. But if a consumer can purchase bicycle insurance, then the cost inflicted on the individual of having his bicycle stolen is much less. After all, if the bicycle is stolen then the person simply has to report it to the insurance company and he will get insurance money to replace it. In the extreme case, where the insurance company completely reimburses the individual for the theft of his bicycle, the individual has no incentive to take care at all. This lack of incentive to take care is called moral hazard. Note the tradeoff involved: too little insurance means that people bear a lot of risk, too much insurance means that people will take inadequate care. If the amount of care is observable, then there is no problem. The insurance company can base its rates on the amount of care taken. In real life it is common for insurance companies to give different rates to businesses that have a fire sprinkler system in their building, or to charge smokers different rates than nonsmokers for health insurance. In these cases the insurance firm attempts to discriminate among users depending on the choices they have made that influence the probability of damage. But insurance companies can’t observe all the relevant actions of those they insure. Therefore we will have the tradeoff described above: full insurance means too little care will be undertaken because the individuals don’t face the full costs of their actions. What does this imply about the types of insurance contracts that will be offered? In general, the insurance companies will not want to offer the consumers “complete” insurance. They will always want the consumer to face some part of the risk.This is why most insurance policies include a “deductible,” an amount that the insured party has to pay in any claim. By making the consumers pay part of a claim, the insurance companies can make sure that the consumer always has an incentive to take some amount of care. Even though the insurance company would be willing to insure a consumer completely if they could verify the amount of care taken, the fact that the consumer can choose the amount of care he takes implies that the insurance company will not allow the consumer to purchase as much insurance as he wants if the company cannot observe the level of care.
Consider the bicycle example. Suppose that the insurance company must not differentiate by the districts where theft happens. What will be the equilibrium? Why?
In: Economics
Question 1 - Delegation
Document an experience you have had with either being delegated
a task or the one who delegated the task and tell us what went
right and what did not.
Question 2 - Empowerment
Document two examples you have experienced either as the
employee or the manager with respect to empowerment.
Question 3 - Influence
Document four examples on how you would influence someone and the reason for your choices.
In: Operations Management
A recent review of actual operating results compared to budget indicates an unfavorable cost variance on both direct materials and direct labor (that is, we are spending more on materials and labor than we expected to). Which departments may be responsible for additional costs? For example, can we blame Human Resources for hiring inexperienced factory workers who have been making many mistakes causing us to waste materials?
In: Accounting
In the 2008 General Social Survey, participants were asked: “To what extent do you consider yourself a religious person?” Of 2023 surveyed, 317 responded: “not at all.”
(a) Construct a 95% confidence interval for the true proportion of US adults who would respond “not at all” to this question.
(b) What is the margin of error for your confidence interval?
(c) How large would the sample need to be to obtain a margin of error of ±1%?
In: Math
Our idea is a platform that includes services to online shoppers who do not have visa we pay instead of them when they transfer money to us by transferring money through local bank also shoppers they have a problem in some websites that do not ship outside the United States we will provide addresses in America receive shipments and then ship them here.
writhe the five competitive forces model for this idea :
In: Operations Management
Estimate: GPA = β0 + β1GRE + ε, where GRE is a student’s score on the math portion of the Graduate Record Examination (GRE) score and GPA is the student’s grade point average in graduate school. [You may find it useful to reference the t table.]
| GPA | GRE |
| 2.8 | 750 |
| 3.4 | 670 |
| 2.5 | 780 |
| 3.4 | 680 |
| 2.8 | 720 |
| 3.7 | 770 |
| 2.4 | 750 |
| 2.6 | 760 |
| 3.8 | 680 |
| 2.7 | 740 |
| 2.7 | 680 |
| 3.1 | 640 |
| 3 | 710 |
| 2.6 | 710 |
| 3.2 | 700 |
| 3.5 | 750 |
| 3.9 | 700 |
| 2.5 | 660 |
| 2.9 | 740 |
| 3.5 | 660 |
| 2.1 | 760 |
| 2.7 | 660 |
| 3.8 | 650 |
| 2.5 | 670 |
a. Construct the 90% confidence interval for the
expected GPA for an individual who scored 730 on the math portion
of the GRE. (Round regression estimates to at least 4
decimal places, "tα/2,df"
value to 3 decimal places, and final answers to 2 decimal
places.)
b. Construct the 90% prediction interval for GPA
for an individual who scored 730 on the math portion of the GRE.
(Round regression estimates to at least 4 decimal places,
"tα/2,df" value to 3
decimal places, and final answers to 2 decimal
places.)
In: Statistics and Probability
Estimate: GPA = β0 + β1GRE + ε, where GRE is a student’s score on the math portion of the Graduate Record Examination (GRE) score and GPA is the student’s grade point average in graduate school. [You may find it useful to reference the t table.] picture
| GPA | GRE |
| 3.3 | 760 |
| 3.8 | 680 |
| 3 | 670 |
| 3.2 | 710 |
| 3.8 | 780 |
| 2.6 | 680 |
| 2.5 | 760 |
| 2.4 | 670 |
| 2.8 | 640 |
| 3.9 | 700 |
| 3.8 | 680 |
| 3.4 | 680 |
| 2.8 | 760 |
| 3.1 | 650 |
| 3.4 | 670 |
| 2.7 | 710 |
| 3.7 | 730 |
| 3.6 | 640 |
| 2.7 | 670 |
| 3.8 | 670 |
| 2.5 | 750 |
| 2.4 | 660 |
| 3.5 | 690 |
| 2.9 | 710 |
a. Construct the 90% confidence interval for the expected GPA for an individual who scored 720 on the math portion of the GRE. (Round regression estimates to at least 4 decimal places, "tα/2,df" value to 3 decimal places, and final answers to 2 decimal places.) b. Construct the 90% prediction interval for GPA for an individual who scored 720 on the math portion of the GRE. (Round regression estimates to at least 4 decimal places, "tα/2,df" value to 3 decimal places, and final answers to 2 decimal places.)
In: Statistics and Probability
Suppose US (N) and Mexico (S) both can produce soccer balls (SB) and footballs (FB). The unit labor requirements for soccer balls and footballs in the US and Mexico are: a N SB = 10; a N FB = 2; a S SB = 10; a S FB = 10
After trade, if the world relative price pW FB pW SB = 1, which product the US decides to produce? Why? Show full derivation in algebra.
Draw and show the gains from trade for the US using the PPF/CPF graph again. (Use the quanity of Football as the X-axis, draw and label PPF, before and after budget constraints, indifference curves, imports and exports)
After trade, if the US relaxed the immigration policy which increased its population to 150 workers. Which product the US decides to produce then? Does the new immigration policy affect the comparative advantage of the US? Please explain.
If the world relative price pW FB pW SB = 1, would Mexico be better off, worse off, or no change, compared with autarky. Why?
In: Economics
The data below represent commute times (in minutes) and scores on a well-being survey. Complete parts (a) through (d) below.
|
Commute Time (minutes), x |
5 |
15 |
25 |
40 |
60 |
84 |
105 |
||
|---|---|---|---|---|---|---|---|---|---|
|
Well-Being Index Score, y |
69.2 |
68.1 |
67.2 |
66.5 |
65.3 |
64.7 |
62.8 |
(a) Find the least-squares regression line treating the commute time, x, as the explanatory variable and the index score, y, as the response variable.
y = [ ] x + [ ]
(b) Interpret the slope and y-intercept, if appropriate. Interpret the slope. Select the correct choice below and, if necessary, fill in the answer box to complete your choice.
A. For a commute time of zero minutes, the index score is predicted to be [ ]
B. For every unit increase in index score, the commute time falls by [ ] on average
C. For an index score of zero, the commute time is predicted to be [ ] minutes
D. For every unit increase in commute time, the index score falls by [ ] on average
E. It is not appropriate to interpret the slope
Interpret the y-intercept. Select the correct choice below and, if necessary, fill in the answer box to complete your choice
A. For an index score of zero, the commute time is predicted to be
[ ] minutes
B. For every unit increase in commute time, the index score falls by [ ] on average
C.For every unit increase in index score, the commute time falls by [ ] on average
D. For a commute time of zero minutes, the index score is predicted to be [ ]
E. It is not appropriate to interpret the y-intercept.
(c) Predict the well-being index of a person whose commute time is 30 minutes
The predicted index score is [ ]
(d) Suppose Barbara has a 20-minute commute and scores 67.1 on the survey. Is Barbara more "well-off" than the typical individual who has a 20-minute commute? Select the correct choice below and fill in the answer box to complete your choice.
A) No, Barbara is less well-off because the typical individual who has 20-minute commute scores [ ]
B) Yes, Barbara is more well-off because the typical individual who has a 20-minute commute scores [ ]
In: Statistics and Probability