Final answer:
The necessity for variables to be typed at declaration depends on the programming language. True for statically typed languages, false for dynamically typed ones. Type I errors incorrectly reject a true null hypothesis, and Type II errors fail to detect a false null hypothesis.
Step-by-step explanation:
The statement about whether all variables must be given a type when they're declared can be true or false depending on the programming language being discussed. In statically typed languages like Java or C++, it is true that every variable must be given a type upon declaration. However, in dynamically typed languages such as Python or JavaScript, it is false because the language automatically infers the type of the variable based on the assigned value.
For the second question regarding the consequences of statistical errors:
a. A consequence of committing a Type I error is that you incorrectly reject the null hypothesis when it is actually true. This could lead to believing there is an effect or difference when there is none, possibly causing unnecessary actions or interventions.
b. A consequence of committing a Type II error is failing to reject the null hypothesis when it is false. This could result in missing a real effect or difference, leading to a lack of action when one is needed.