Publications by Arvind Sharma
Bayes_Tree_3
1 Bayes Theorem Question Bayes’ Theorem can yield surprising results. Take a look at Guided Practice 3.43 (Open Stats) and attempt to solve this using Bayes’ formula. Interpret the results. Then use the attached code and solve via a tree diagram in R. You will need to change the initial parameters to the appropriate values. Attach your final gr...
1999 sym R (19890 sym/45 pcs) 3 img
Distributions_Q2
It would be very helpful if you could plot the distributions before calculating the probabilities. Begin with reading up on the plot() function. These questions will help you build an understanding of Normal, Binomial, Hypergeometric and Poisson distribution. Some online readings may be helpful as well. You will be using the probability density fun...
1694 sym 1 img
CAPM
1 Set Up rm(list = ls()) # Clear environment gc() # Clear unused memory ## used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) ## Ncells 525337 28.1 1166321 62.3 NA 669282 35.8 ## Vcells 965398 7.4 8388608 64.0 32768 1840402 14.1 cat("\f") # Clear the console graphics.off() # Clear the char...
802 sym R (4377 sym/20 pcs) 2 img
Distributions
1 Class Example: Probability Distribution 1.1 Count of heads on a toss of two coins Let X be the count of heads on a toss of two coins. Input the data. x <- c( 0, 1, 2) px <- c(.25, .5, .25) Now, lets plot it. ?barplot barplot(height = px, names.arg = x, main = "Discrete Distribution", xlab = "Heads", ylab...
6377 sym Python (15794 sym/169 pcs) 10 img
OVB
1 Wage Example 1.1 Data Lets load wage1 data. It is a data.frame with 526 rows and 24 variables (individual demographic, region where they live, their industry/occupation, et cetra: wage. average hourly earnings educ. years of education exper. years potential experience tenure. years with current employer nonwhite. =1 if nonwhite female. =1 if fe...
3577 sym R (8957 sym/30 pcs) 4 img 1 tbl
HW2
1 What is the probability of rolling a sum of 12 on three rolls of six-sided dice? Express your answer as a decimal number only. Show your R code. Hint: One way would be to use expand.grid function to list out all the possible outcomes, then use rowSums function to create sum of three dice, then use Indexing rules to identify cases where the sum on...
14052 sym R (22845 sym/131 pcs) 4 img
Residual_Plots_MARR
# Clear the workspace rm(list = ls()) # Clear all files from your environment # gc() # Clear unused memory cat("\f") # Clear the console graphics.off() # Clear all graphs 1 Raw Data x1 <- c(10,8,13,9,11,14,6,4,12,7,5) x2 <- x1 x3 <- x1 x4 <- c(rep(x = 8, times=7), 19, rep(x = 8, times=3 )) y1 <- c(8.04, 6.95, 7.58, 8.81,...
266 sym R (6782 sym/31 pcs) 21 img
Residual_Plots
# Clear the workspace rm(list = ls()) # Clear all files from your environment # gc() # Clear unused memory cat("\f") # Clear the console graphics.off() # Clear all graphs 1 Linear Regression Specification # Loads specified data sets, or list the available data sets. data() # Store the data mtcars as a dataframe df <- a...
10206 sym R (8465 sym/30 pcs) 11 img
Discussion4
Instructions Go to Kaggle.com (owned by Google). Create a free account. Sign up for the Titanic: Machine Learning through Disaster competition located here: https://www.kaggle.com/c/titanic/data?select=train.csv Download the train.csv data. Open the train.csv file in R. To do so, use something like mydata <- read.csv(‘D:/train.csv’) but replac...
1770 sym Python (9462 sym/17 pcs) 1 img
Pivot Tables
Instructions Go to Kaggle.com (owned by Google). Create a free account. Sign up for the Titanic: Machine Learning through Disaster competition located here: https://www.kaggle.com/c/titanic/data?select=train.csv Download the train.csv data. Open the train.csv file in R. To do so, use something like mydata <- read.csv(‘D:/train.csv’) but replac...
1916 sym Python (2152 sym/9 pcs) 2 img