I don't understand why this isn't being calculated

?. 

It does the basic arithmetic ok but doesn’t compute the probability functions. Do I need to add a library?

This is just because the functions you are trying to use aren’t defined as default in kdb.
https://code.kx.com/q/ref/ is a good reference to the predefined keywords that are available to use.
If you want to use functions that you have defined previously the best option would probably be to save these in a .q file which can then be loaded into your new q session. See https://code.kx.com/q/learn/tour/scripts/ for some info on q scripts