# Case of a cubic spline, basis functions

I was studying the basis functions as describes in the Elements of Statistical Learning book on p.143. More precisely, I looked at the basis functions of that particular for cases. While the topleft panel has 12 basis functions (4 in each segment), the bottomright has only 6 (due to our additional contrainsts). However, I am unsure how many basis funcions the topright panel has. My idea was, that we have 12 parameters (4 in each segment * 3) - 2 constraints for requiring continuity, ending up with 10 basis functions of the form:

$$h_1(x)=1$$ $$h_2(x)=x[x<\xi_1]$$ $$h_3(x)=x^2[x<\xi_1]$$ $$h_4(x)=x^3[x<\xi_1]$$ $$h_5(x)=x[\xi_1 $$h_6(x)=x^2[\xi_1 $$h_7(x)=x^3[\xi_1 $$h_8(x)=x[x>\xi_2]$$ $$h_9(x)=x^2[x>\xi_2]$$ $$h_10(x)=x^3[x>\xi_2]$$

Would that be correct, or do I miss something ?

• Think about the bottom left panel, too: a pattern will emerge that helps give you a sense of what's going on. – whuber Jan 9 '20 at 23:36
• @whuber I think that there should be additional two restrictions (in case of two knots) freeing two parameters which results into 8 basis functions and another two restrictions for the bottomright panel, endnig up with 6 basis functions. – Vala Jan 10 '20 at 7:18