The variables in lines 52 to 58 are member variables - they are declared in the scope of the class, not inside a method or constructor.
At the moment when these variables are initialized, the constructor has not yet run. That means that the member variables num1, num2, etc. are still null.
When you call a method on a variable that is null, you get a NullPointerException.
You should put lines 52 to 58 inside a method. You don't want to get the content of the text fields when the class is initialized, but rather when somebody clicks a button. You should probably put lines 52 to 58 in the method called ExpectedValue (declared in lines 59 - 72).
You should also pay some attention to formatting your code properly, so that it is easier to read.