library(tswge) library(tidyverse) library(magrittr) library(ggthemes)
This is what a sine wave looks like
$$\delta = 0; y = \mathrm(sin)(t)$$
curve(sin, 0, 2*pi, xname = "t")
We can phase shift the sin wave by adding
RED: $$\delta = \pi; y = \mathrm{sin}(t+\pi)$$
BLUE: $$\delta = \frac{\pi}{2}; y = \mathrm{sin}(t+\frac{\pi}{2})$$
curve(sin(t + pi), 0, 2*pi, xname = "t",col = "red") curve(sin(t + pi/2),0,2*pi,xname = "t", add = T,col="blue")
Now cosine
curve(cos, 0, 2*pi, xname = "t") curve(cos(t + pi), 0, 2*pi, xname = "t",col = "red",add = T) curve(cos(t + pi/2),0,2*pi,xname = "t", add = T,col="blue")
Let us say $f(x)$ is a periodic function. If $f(x)$ has period $p$, then $p$ is the smallest value S.T. $$f(x) = f(x + kp) $$
Cool
Data are psuedo-periodic with period $p$ if $p$ is the smallest value such that a cycle appears to repeat itself.
Aperiodic data is data in which no $p$ exists.
Frequency is calculated as : $\frac{1}{p}$
It symbolizes the number of cycles per unit(number of periods per unit)
Frequency of a trigonometruc function:
Let $f(x)=\sin\left( 2\pi f t \right)$
Then we have that :
$$p = 1/f$$ $$\nu = f$$
Consider: $$\sin(Bt + C)$$ Then $$p = \frac{2 \pi}{B}$$ $$\nu = \frac{B} {2 \pi}$$
this is a signal with three frequencies!
A lot of realizations are made up of components of various frequencies, and some do not have frequency at all. Uncovering the frequency content of a dataset (or lack thereof) allows us to better understand the process generating the data.
When we do spectral analysis, we are generally going to be decomposing functions into sine and cosine terms, in order to better analyze the frequency of the data.
You should just know this by this point, if you dont, google it. Too lazy to tex up the equations. Basically, we can decompose any function into a bunch of sines and cosines. It is pretty rad. The important conclusion of the existence of fourier series is that we can represent non cyclic functions as a bunch of sines and cosines, which will allow us to do spectral analysis of them.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.