a)The Python code for doing the Monte Carlo Simulation and finding the sample mean, sample standard deviation, 25th and 75th percentiles, 95% confidence interval and the probabilities is given below.
import math import numpy as np X = [] N = np.random.randint(low=50, high=145, size=5000) for i in range(5000): s = 0 for j in range(N[i]): Z = np.random.triangular(left=280, right=740, mode=510, size=1) s += Z X.append(s) m= np.mean(X) sd = np.std(X) print("Sample mean is:", m) print("Sample standard deviation is:", sd) conf1 = m - 1.96*sd/np.sqrt(5000) conf2 = m + 1.96*sd/np.sqrt(5000) print("The 95% confidence interval is:", conf1, " ,", conf2) print("The 25th and 75th percentiles are:", np.percentile(X, 25), " ,", np.percentile(X, 75)) X = np.array(X) X1 = X[X < 40000] X2 = X[X > 70000] print("The probability that the loss will be less than $40,000 is:", len(X1)/5000) print("The probability that the loss will be greater than $70,000 is:", len(X2)/5000)
The sample output is:
Sample mean is: 49859.333663659585
Sample standard deviation is: 13889.666862680726
The 95% confidence interval is: 49474.33174068026 ,
50244.33558663891
The 25th and 75th percentiles are: 38091.16156246797 ,
61866.255521021754
The probability that the loss will be less than $40,000 is:
0.2872
The probability that the loss will be greater than $70,000 is:
0.0776
b) We have sample mean is , sample standard deviation is , 95% confidence interval is , 25th and 75th percentiles are , and the probabilities are
c) We have
The 95% CI is
The CI has shifted to left.
d)The probabilities are
Monte Carlo Simulation This lab assignment consists of two problems involving Monte Carlo simulation. You should...
Please solve step by step. USE PYTHON OR EXCELL NO OTHERS. The actuaries for an insurance company represent the total losses experienced during a week as follows: Let N represent the number of policies that experience a loss during the week, and Zı, Z2, independent random variables that have the same distribution representing the amount of each loss be Then the total losses for the week are Z1+Z2+Z3 ... + ZN X a) Let N have a discrete uniform distribution...
The assignment is to perform a Monte Carlo simulation for the probability distribution of rolling two die and taking the sum of the two die. Therefore, your random variable will be x=2,3,4,5,6,7,8,9,10,11,12 and you will obtain the probabilities for each of those random variables by a Monte Carlo simulation. The requirements to get full credit are 1. R script must run 2. When I run your R script the script should clearly display the mean, the standard deviation and a...