#1) how to define variables as numeric(I've tried several examples(forums and manuals)
You assign them numeric values. You are assigning strings to variables, and then trying to add those strings together.
I'll answer your question with another question:
$prevbal="prevbal";
This assigns the string value "prevbal" to the $prevbal variable.
#2) how to add several variables together so they are known as numeric(they are all decimal 8,2 in the database)
So I take it you think your assignments are somehow pulling from the database? I do not know why you would have that impression. You need to perform a query, read the first row, and then assign the fields from that row to those variables.
#3) Please, someone explain the "Undefined variable: mysql".
$mysqli is undefined. You probably want the mysqli_query function.