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

Introduction of Normal Distribution Functions in R (Examples)

The tutorial provides examples for each of these 4 normal distribution functions in R. R has 4 normal distribution functions, including rnorm, dnorm, pnorm, and qnorm. The following table provides a summary for each of these 4 normal distribution functions in R. Syntax of R functions Definitions Examples rnorm(n, mean, sd) Generate a sample of … Read more

Categories R

Probability Density Functions in R (Examples)

The tutorial shows examples of how you can use built-in Probability Density Functions (PDF) in R, including PDF for normal distribution (dnorm), uniform distribution (dunif), and exponential distribution (dexp). Example 1: PDF for Normal Distribution Normal distribution PDF dnorm() in R returns the density of probability at 2. Note that it is standard normal distribution … Read more

Latex Code for Uniform Distribution PDF

The following is Probabiliy Density Function (PDF) of uniform distribution. Below includes tutorials showing how to write it as Latex code. Further, this tutorial also shows how you can write it in Markdown and WordPress. Latex Code for Uniform Distribution PDF The following is the Latex code for correlation formula. f(x) = \left\{ \begin{array}{rcl} \frac{1}{b-a} … Read more

How to Add Latex Math Formulas in WordPress

This tutorial shows how you can add math formulas on WordPress. The basic idea is that you can use Latex with imported javascript. The following shows steps of adding math formulas on WordPress. Steps of Adding Latex Math Formulas in WordPress Step 1: Write math formulas using Latex You can use R Markdown, Jupyter Markdown, … Read more

Latex: How to Add Notations Underneath limit

To add notation like Δx→0 underneath the limit (lim) notation (see below), you can use \lim\limits_{}. Generic Version (Base Version) The following is the Latex code for the formula above. f_X(x)= \lim\limits_{\Delta x \rightarrow 0} For Markdown If you want to show the formula above in R Markdown or Jupyter Markdown, you can use the … Read more