PDF File PDF File PDF File

1 answer below »
I have included the 3 question assignment with associated detail pages for question 3.


PDF File PDF File PDF File
Answered Same DayOct 23, 2021

Answer To: PDF File PDF File PDF File

Abr Writing answered on Oct 25 2021
146 Votes
assignment3.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "1oGjoWSWqQ77"
},
"source": [
"## Assignment 3"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "-oi4JzShqQ78"
},
"source": [
"This assignmemt is based on content discussed in module 3 and test basic concepts of probability theory and normalization in statistics."
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "gjI1J5nXqQ79"
},
"source": [
"## Learning outcomes"
]
},
{
"cell_type": "markdown",
"metadat
a": {
"colab_type": "text",
"id": "R9t0LyaqqQ7-"
},
"source": [
"- Work on problems of different distributions eg., binomial, gaussian \n",
"- Calculate z score \n",
"-\t Make statistical inferences on given data\n",
"-\t Construct a null and an alternate hypothesis\n",
"-\t Find the p-value for a given hypothesis and T test statistic.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "_lXvCMN_qQ7_"
},
"source": [
"**Question 1**\n",
"\n",
"The Capital Asset Pricing Model (CAPM) is a financial model that assumes returns on a portfolio are normally distributed. Suppose a portfolio has an average annual return of 14.7% (i.e., an average gain on 14.7%) with a standard deviation of 33%. A return of 0% means the value of the portfolio doesn't change, a negative return means that the portfolio loses money, and a positive return means that the portfolio gains money. Determine the following:\n",
"\n",
"1. What percentage of years does this portfolio lose money, (i.e. have a return less than 0%)?\n",
"2. What is the cutoff for the highest 15% of annual returns with this portfolio?\n",
"\n",
"See CAPM here https://en.wikipedia.org/wiki/Capital_asset_pricing_model "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Solution 1**\n",
"\n",
"_Part 1_\n",
"\n",
"Asumming that te annual returns are normally distributed with an average of 14.7% and a standard deviation of 33%. We need to find the probability this normally distributed random variable is less than 0% because then only this portflio will lose money."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Probability that that the annual returns will be less than 0% is 32.80%\n"
]
}
],
"source": [
"import scipy.stats as stats\n",
"x = 0\n",
"mean_wt = 14.7\n",
"sd_wt = 33\n",
"prob = stats.norm.cdf((x-mean_wt)/sd_wt)\n",
"print('Probability that that the annual returns will be less than {}% is {:.2f}%'.format(x, prob*100))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_Part 2_"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Probability that that the annual returns will be less than 15% is 50.36%\n"
]
}
],
"source": [
"x = 15\n",
"prob = stats.norm.cdf((x-mean_wt)/sd_wt)\n",
"print('Probability that that the annual returns will be less than {}% is {:.2f}%'.format(x, prob*100))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The probability that the cutoff for the annual returns is 15% or the annual returns will be greater than 15% is less than 50% or equal to 49.64%."
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "_l53E9BAqQ8A"
},
"source": [
"**Question 2**\n",
"\n",
"Past experience indicates that because of low morale, a company loses 20 hours a year per employee due to lateness and abstenteeism. Assume that the standard deviation of the population is 6 and normally distributed.\n",
"\n",
"The HR department implemented a new rewards system to increase employee morale, and after a few months it collected a random sample of 20 employees and the annualized absenteeism was 14.\n",
"\n",
"1. Could you confirm that the new rewards system was effective with a 90% confidence?\n",
"2. An HR subject matter expert would be very happy if the program could reduce absenteeism by 20% (i.e. to 16 hours). Given the current sampling parameters, what is the probability that the new rewards system reduced absenteeism to 16 hours and you miss it?\n",
"3. Repeat part 1) and 2) with an α = 95% CI.\n",
"4. Based on the answers in 3), is the sampling method good enough to identify a reduction from 20 to 16 hours if I use a confidence of 95%?\n",
"5. What should the sample size be if you want β to be 5%"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Solution 2**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_Part 1_"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(10.130878238291164, 29.869121761708833)\n"
]
}
],
"source": [
"mean = 20\n",
"sigma = 6\n",
"confidence = 0.90\n",
"print(stats.norm.interval(confidence, loc=mean, scale=sigma))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"From the above results, we cas see that given the company loses 20 hours on an average per employee in year with a standard deviation of 6 hours, the 90% confidence interval for the numbers of hours lost, assuming normal distribution varies from 10.13 to 29.87 hours. After the new rewards system it was found that the average annualized absenteeism was now 14 for 20 employees. Therefore, we cannot confirm that the new rewards system was effective with a 90% confidence considering that 14 was within the range found above."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_Part 2_"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Assuming that the standard deviation for the new sample is still equal to 6. We can calcuate the probability that the new rewards system reduced absenteeism to 16 hours and we missed it"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Probability that that the lost hours will be less than 16% and we...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here