BIOphysics & SOFT Matter Department of Ultrafast Optics and Nanophotonics

Institut de Physique et Chimie des Matériaux de Strasbourg

[ -- Internship Proposals -- ]

A blog for physicists or biologists. Mainly for experimentalists interested in Statistics. R scripts detailed and explained.


Associate Professor at Université de Paris

Home Page

TAGS (on this page)

Change point Detection Part I

Posted 2020-12-01 by Wilfried. Post 9 of 13.
ChangepointHypothesis_Testing t-test

Change point detection. Part I : rolling t-test

In a time series, change point detection tries to identify abrupt changes. Different approaches have been proposed and here I show one of them based on a simple rolling t-test.

For this example, I use ggplot2 and so you need to enter:

rm(list = ls()) 
if (!require(ggplot2)) install.packages('ggplot2')

Read More [...]

Statistical Power

Posted 2020-10-30 by Wilfried. Post 8 of 13.
PowerHypothesis_Testing t-test

What is Statiscal Power? Why should I mention it when comparing means of 2 samples?

We have previously performed some 2-sample t-tests. When the p-value was smaller than 0.05, we have concluded that the 2 samples originate from 2 populations with equal means. Obviously the probability to conclude that 2 samples (originating from populations with different means) have equal means depends on the sample size, the actual difference in means and the type-I error. That is what we will investigate here.

Let us define some parameters:

rm(list = ls()) 
delta<-0.5 # difference in means
sd<-1.5 # standard deviation in populations
mu1<-20 # mean of 1st population
mu2<-mu1+delta # mean of 2nd population
n<-40 # number (n) of elements in each sample

Read More [...]

t-tests and Confidence Intervals

Posted 2020-10-25 by Wilfried. Post 7 of 13.
Confidence_IntervalsHypothesis_Testing t-test

Calculating 0.84 confidence intervals and performing a two-sample t-test

As usual, we check for some packages.

rm(list = ls()) 
if (!require(gridExtra)) install.packages('gridExtra')

Read More [...]

ANOVA (ANalysis Of VAriance) Part II

Posted 2020-10-20 by Wilfried. Post 6 of 13.
ANOVAHypothesis_Testing graphs

P i m p my ANOVA Graph. Display FDR values for multiple comparisons

As usual, we check for some packages

rm(list = ls()) 
# Check for Packages
if (!require(ggsignif)) install.packages('ggsignif')

Read More [...]