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

Latex Code for Correlation Formula

The following are the correlation formula. Below includes tutorials showing how to write it as Latex code in Markdown and WordPress. Latex Code for Correlation Formula The following is the Latex code for correlation formula. r_{xy}=\frac{\sum_{i=1}^{n}((x_i-\bar{x})(y_i-\bar{y}))}{\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2}\sqrt{\sum_{i=1}^{n}(y_i-\bar{y})^2}} Latex Code for Correlation Formula in Markdown You can use the following Latex code to show the correlation formula … Read more

Latex Code for Density Function of Normal Distribution

The following is density function of normal distribution. Below includes tutorials showing how to write it as Latex code in Markdown and WordPress. Latex Code for Density Function of Normal Distribution The following is raw Latex code for the density function for normal distribution. f(x)=\frac{1}{\sqrt{2 \pi \sigma^2}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} Latex Code for Density Function of Normal Distribution … Read more

How to Use rnorm in R (Examples of Simulate Normal Distribution)

rnorm() in R can be used to simulate a sample of normal distribution data. This tutorial uses 3 examples showing how you can simulate normal distribution sample using rnorm(). In particular, rnorm has the following statement. rnorm(n, mean=0, sd=1) n: The number of observations, namely the sample size mean: The mean of the normal distribution sample data. The default … Read more

Categories R

How to Calculate Trimmed Means in R (Examples)

A trimmed mean is a mean trimmed by x%, where x is the percentage of observations removed from both the upper and lower bounds. For instance, 10% trimmed mean is the mean computed by excluding th 10% largest and 10% smallest observations in the data. mean() in R has the parameter of trim, which should … Read more

Categories R