wilsonzhang746

Estimating simple linear regression model using lm() in R

Linear regression is widely used to model the relationship between response or dependent variable and explanatory or independent variables. The…

2 years ago

Using exponential distributions in Python

The exponential distribution is modeling the probability distribution of the random time until next event occur in a Poisson event…

2 years ago

Append, insert and remove elements of lists in Python

The elements of a list can be added or removed after it has been created. To add new elements at…

2 years ago

Working with Python classes and instances

Python uses class for object-oriented programming. A class represents the general behavior or information that the programmer or data analyst…

2 years ago

Calculating partial correlations with R

When we do data analysis, random variables in the dataset are usually mutually correlated. Sometimes, we may want to measure…

2 years ago

Working with normal distributions in Python

Normal distribution is describing random variables with bell-shaped probability density functions. Normal distribution is widely used in data science because…

2 years ago

Calculate point-biserial and biserial correlations using R

When a correlation, usually Person type correlation, is calculated, two variables have to be continuous. But this requirement does not…

2 years ago

Use spread() of dplyr in R to convert long-form dataset into wide-form

dplyr is a package that belongs to tidyverse framework. dplyr allows usage of pipeline structure (%>%), which can chain multiple…

2 years ago

Creating data frames using read.table() and read.csv() in R

R language provides several useful functions for importing delimited files and creating data frames. These delimited files are often stored…

2 years ago

Creating and indexing lists in Python

List is the simplest type of data structure in Python programming. A list is used to store a collection of…

2 years ago