I'm stuck learning the hat matrix and wondered if someone could help with a question. If I have the model $$Y_i =\beta_0+\beta_1X_i+\epsilon_i,i = 1,2,3 \dots n,$$ how can I calculate the hat matrix as
$$H = X(X^\prime X)^{-1}X^\prime$$
And what would the $h_{ij}$ element be?