Publications by Arvind Sharma
Satterthwaite Formula
1 Null/Alt \[ n_1=28 \] \[ n_2=22 \] I will use function mean. I am given - n1 <- 28 n2 <- 22 x1_bar <- 1025 x2_bar <- 910 s1 <- 150 s2 <- 125 2 Method 1: test stat vs critical value I need to compute my test statistic and compare it with my critical value 2.1 Test Statistic se <- sqrt( (s1^2 / n1) + (s2^2 / n2) ) se ## [1] 38.90757 test_stat...
435 sym
merge
1 Import # Consumers consumers <- read.csv("~/Library/CloudStorage/Dropbox/WCAS/Data Analysis/data_MA/multiple_table_data/Restaurant_Ratings/consumers.csv") consumer_preferences <- read.csv("~/Library/CloudStorage/Dropbox/WCAS/Data Analysis/data_MA/multiple_table_data/Restaurant_Ratings/consumer_preferences.csv") # Restaurants restaurants <- rea...
422 sym R (7676 sym/35 pcs) 9 img
HW3
rm(list = ls()) # Clear environment gc() # Clear unused memory ## used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) ## Ncells 531902 28.5 1185087 63.3 NA 669265 35.8 ## Vcells 983123 7.6 8388608 64.0 16384 1840436 14.1 cat("\f") # Clear the console dev.off # Clear the charts ## fun...
14061 sym Python (22925 sym/125 pcs) 13 img
L_churn
Table of contents Clear Import Data Visualize Data Summary Stasistics Clean Data Balance Tables Correlation Analysis Regressions Logistic Models Outcome varibale L_Churn Clear #| output: false rm(list = ls()) # Clear environment gc() # Clear unused memory used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells...
563 sym Python (11550 sym/33 pcs) 2 img 1 tbl
Discussion2_bayes
Week 2 Discussion Bayes’ Theorem can yield surprising results. Take a look at Guided Practice 3.43 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 graph to your submissi...
2014 sym R (22994 sym/45 pcs) 2 img
HW2_solution
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 (22838 sym/131 pcs) 4 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...
6384 sym Python (15794 sym/169 pcs) 10 img
symposium_diff_in_diff
Difference in Difference Arvid Sharma Introduction Difference-in-differences (DiD or DD) is a statistical technique commonly used in Econometrics and social sciences to estimate the causal effect of an intervention or policy change (aka “treatment”) on an outcome of interest. Origins of Diff-in-Diff: John Snow’s Cholera1 Hypothesis (water...
5710 sym 11 img 1 tbl
week2_meetup
1 Linear Regression Linear regression quantifies the relationship between two (or more variables). We will cover it more thoroughly in the last week of the course. We can choose an outcome variable, and write it as a function of other variables called “covariates” and estimate the “best fit” line which tells us whether the two variables are...
2132 sym R (4475 sym/36 pcs) 4 img
Updated 03192024
R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the...
664 sym R (54980 sym/62 pcs) 9 img