Calculate Sample Variance in Excel

You can use the VAR, VAR.S or VARA functions to calculate sample variance.  Data Example We are going to use the following sample of 6 students with math scores. The following is how the data looks in Excel. Example of Var() Thus, you can type =VAR(B2:B7) at E2 to calculate sample variance. You can type it anywhere other than E2 … Read more

Sample Variance Formula and Calculation by Hand

Sample variance is the measure of the variability in a given sample. A sample is a set of observations that are a subset of a population. Sample Variance Formula The following is the formula for sample variance. where, Data Example The following is a sample of 6 students with math scores. Calculating sample variance by … Read more

How to Calculate Mean in Excel

You can use the syntax of =AVERAGE() to calculate the mean in Excel. Example 1: one column You type the syntax of =AVERAGE(B2:B12) in one cell. Basically you can choose any cells to type that, and I just chose E2 as an example. Example 2: Two columns For data in two different columns, you need … Read more

Calculate Standard Deviation in Excel

STDEV(), STDEV.S(), and STDEV.P() can be used to calculate standard deviation in Excel. It depends on if you are calculating sample or population standard deviation. Sample Standard Deviation: Use either STDEV() or STDEV.S(). Population Standard Deviation: Use STDEV.P(). Example 1 The following is a sample of 6 students. You can use =STDEV(B2:B7) to calculate the sample standard … Read more

Conduct Paired Samples t-test in Excel

This tutorial shows detailed steps of how to do paired-sample t-test in Excel with a data example. Data Example The data table shown below has 3 columns, name, math, and English. We are going to compare if Math and English are significantly different. Hypothesis The followings are the null hypothesis and the alternative one for … Read more

How to Calculate Two-Factor ANOVA without Replication

ANOVA Two-Factor without Replication is used for a design of two factors (e.g., Factor A and Factor B) and only 1 observation in each cell. For instance, both Factor A and Factor B have two levels, leading to 4 cells in total. Each cell only has 1 observations (see below). Variance Partitioning Two-Factor ANOVA without … Read more

Read CSV without the first column in Python

This tutorial includes two methods to read CSV without the first column in Python. Method 1: pd.read_csv(“CSV_file_name”,index_col=0) Method 2: df=pd.read_csv(“CSV_file_name”) del df[df.columns[0]] Example for Method 1 The following is an example showing without and with index_col=0 in read.csv(). The following is the output, which includes both versions of dataframe. In the removed dataframe, we remove … Read more

Poisson Regression in R

You can set family=poisson in the glm() function to do Poisson regression in R. glm(model_statement, family = poisson, data = data_file_name) Data Example This tutorial will use a dataset for Poisson regression. The following shows the key variables in this dataset. We are going to see if age can predict the number of people in … Read more

Categories R

Difference between Logit and Probit

This tutorial explains the difference between logit and probit in statistics with formulas and examples. Formula and Example for Logit We can start with the following formula. Thus, \( \beta_0+\beta_1x_1+…+\beta_nx_n \) can be from \( -\infty \) to \(+\infty \), and \( p(y=1) \) will be always within the range of \( (0,1) \). We … Read more