Latex Code: CDF of Standard Normal Distribution

The following is the Latex code for CDF of Standard Normal Distribution. \Phi(x)=P(Z \leq x)= \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x}\exp\left\{-\frac{u^2}{2}\right\} du. Showing CDF of Standard Normal Distribution on WordPress If you combine the latex above with some JavaScript and HTML, you can add it as WordPress Shortcode and show it in WordPress. <script type=”text/javascript” async=”” src=”https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML”> </script> … Read more

qnorm() in R: Definition and 5 Examples

This tutorial explains how you can use qnorm() in R with examples. qnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) p: the probability. mean: The mean of the normal distribution sample data. The default value is 0. sd: The standard deviation. The default value is 1. lower.tail: By default, lower.tail = TRUE. It means … Read more

Categories R

Type 3 ANOVA in R (with Examples)

Type 3 ANOVA in R can be calculated using Anova() function from CAR. The following shows the steps of doing it in R. Step 1: Prepare data in R The data has two categorical IVs (cities and stores) and one DV (sales). x_1 = rep(c(‘City1′,’City2’),each=5) x_2 = rep(c(‘store1′,’store2’), 5) sales=c(10,20,20,50,30,10,5,4,12,4) df <- data.frame (cities = … Read more

Categories R

Type 2 ANOVA in R (with Examples)

This tutorial shows how you can calculate Type 2 ANOVA in R with an example. Anova() in the package of Companion to Applied Regression (CAR) can be used to calculate Type 2 ANOVA in R. Note that, Anova() in CAR only provides options of Type 2 and Type 3 ANOVA. It is different from another function … Read more

Categories R

Type 1 ANOVA in R (with Examples)

This tutorial shows how to do Type 1 ANOVA in R. There are two functions in R that can be used to calculate Type 1 ANOVA, anova() or aov(). Note that, anova() here is different from Anova() in Companion to Applied Regression (CAR). Anova() in CAR can be used only for Type 2 and Type … Read more

Categories R

How to Get Current Weekday in Python

This tutorial shows how you can get the current weekday in Python with 2 examples. Method 1: use weekday() Method 2: use isoweekday() Examples of getting current weekday in Python Example 1 for method 1 We can also check which weekday it is using weekday(). It returns the day of the week as an integer, … Read more

What is dnorm in R (Examples)

This tutorial shows how you can use dnorm() in R with examples. The following is the syntax of dnorm(). dnorm(x, mean = 0, sd = 1, log = FALSE) mean: The mean of the normal distribution sample data. The default value is 0. sd: The standard deviation. The default value is 1. log: logical; if TRUE, returned log() value … Read more

Categories R

Linear Regression with Categorical Variables in R (4 Steps)

For linear regression models, IVs can be either categorical, numerical, or a combination of them. This tutorial focuses on linear regression with categorical variable as IVs in R. For instance, the dependent variable Y is sales, whereas the independent variable X is City. City is a categorical variable with two levels, namely City1 and City2. … Read more

Categories R

How to Use pnorm in R (Examples)

This tutorial shows the definition of pnorm() in R and how to use it with examples. pnorm() is used to return probability (p) for the given quantile (q). pnorm(q, mean, sd, lower.tail = TRUE, log.p = FALSE) q: the quantile (value on the x-axis) mean: The mean of the sample data. The default value is 0. sd: The standard deviation. The … Read more

Categories R