Question
HW_3 # Using Python please answer the bellow two questions. The dataFrame variables are : 'age' , 'success, , 'accident' , 'events' , 'time' ,
HW_3 #
Using Python please answer the bellow two questions.
The dataFrame variables are : 'age' , 'success, , 'accident' , 'events' , 'time' , 'income 1. Simulate data of size 2500 such that variable 'age' will have values from 1 to 100, variable 'success' will be simulated from geometric distribution with success probability p=.30, variable 'accident' will be simulated from binomial distribution with parameters n=10 and p=.60, variable 'events' will be simulated from Poisson distribution with parameter lambda=4, variable 'time' from exponential distribution with parameter 1/7, variable 'income' from normal distribution with parameters 10 and 2. Split the simulated data by age variable. Compute mean for each age of the simulated data. Randomly replicate this procedure for 100 times and then again compute mean.
2. In this simulation design, we will simulate data of size 2500 from various probability models under the assumption that data will be generated with varying parameter values where age takes values from 1 to 100 from uniform distribution. The probability models are binomial (parameters, n=10, p between 0.4 & 0.7), Poisson (parameter, between
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started