Learn R Programming

bayesrules (version 0.0.3)

plot_normal_likelihood: Plot a Normal Likelihood Function

Description

Plots the Normal likelihood function for variable \(\mu\) given a vector of Normal data y.

Usage

plot_normal_likelihood(y, sigma = NULL)

Value

a ggplot of Normal likelihood

Arguments

y

vector of observed data

sigma

optional value for assumed standard deviation of y. by default, this is calculated by the sample standard deviation of y.

Examples

Run this code
plot_normal_likelihood(y = rnorm(50, mean = 10, sd = 2), sigma = 1.5)

Run the code above in your browser using DataLab