# Toward Questionnaire Complexity Reduction by Decreasing the Questions
## 3 Research Framework
### Methodology  
Let \(q_{i}\) be the \(i\)-th question of the considered questionnaire \(Q\), which is composed of \(N\) questions. When responding to the questionnaire, each question must be answered by selecting one of the possible available answer options for that question. The non-selection of an answer is also considered as a possible option. Let \(PossibleAnswers_{i}\) be the set with the possible answers for \(i\)-th question, and let \(Examples_{i}\) be the set with the answers for the \(i\)-th question given by the students who fulfilled the questionnaire. Let \(H(Examples_{i})\) be the entropy of the set of examples for the \(i\)-th question. It offers information about the number of bits, which is necessary to codify the values of the examples. Lower entropies are preferred. In particular, if all the examples belong to the same class, then \(H(Examples_{i})=0\), so a perfect classification has been performed. The definition of the entropy \(H(Examples_{i})\) is as follows:  
\[H(Examples_{i})=-\sum_{a\in PossibleAnswers_{i}}p_{a}\log_{2}p_{a}, \tag{1}\]  
where \(p_{a}=\frac{|Examples_{i}(a)|}{|Examples_{i}|}\). Note that \(\sum_{a\in PossibleAnswers_{i}}p_{a}=1\), and \(|S|\) stands for the cardinality (number of elements) of set \(S\). It should be noted that the base of the logarithm simply indicates the units in which the information is measured (base 2 logarithms for bits, base 10 for dits, and base e for nats). Therefore, one logarithm or another could be used to calculate the entropy since the measure of information will be the same, except that it will be expressed in different units. The easiest way to calculate entropy with a basic scientific calculator is to use base 10 or Napierian logarithms, which are usually found in all basic scientific calculators. The algorithm that filters the questions is described as follows. For each question of the questionnaire, the entropy of the answers given by the respondents was calculated. If this entropy is lower than a given \(threshold_{h}\), then that question is filtered (so that it can be skipped), and all the answers given by the respondents are fixed to the answer more repeated (most frequent) in that question. The pseudocode is shown in Algorithm 1. Using entropy instead of probability is often done due to entropy providing a more comprehensive measure of the distribution of samples; in contrast, probability does not offer information about the uncertainty or disorder present in data. This measure is useful for decision-making processes in machine learning algorithms. For example, the well-known ID3 algorithm [48] uses entropy to generate a decision tree from a given dataset to make predictions. ```
\(filteredQuestions=\emptyset\) for each\(q_{i}\in Q\)do if\(H(Examples_{i})\leq threshold_{h}\)then \(filteredQuestions.add(q_{i})\) \(max\_p=\infty\) for each\(q_{j}\in PossibleAnswers_{i}\)do if\(p_{a_{j}}<max\_p\)then \(max\_p=p_{a_{j}}\) \(majorityAnswer=a_{j}\) endif endfor for each\(e\in Examples_{i}\)do \(e=majorityAnswer\) endfor endif endfor
```  
**Algorithm 1** Algorithm proposed in this work. When the attribute is binary (a question exhibits only two possible answer values in our case), its entropy is called binary entropy and the classes can be generalized into positive and negative classes, respectively. In this case, we have \(p_{+}\) and \(p_{-}\), where \(p_{+}=1-p_{-}\). Additionally, it has some peculiarities. Let \(B(p,q)\) be the binary entropy, where \(p\) represents the number of positive examples and \(q\) is the number of negative examples. Then, we have the following:  
* \(B(p,q)\in[0..1]\)
* \(B(k,k)=1\)
* \(B(k,0)=0\)
* \(B(p,q)=B(q,p)\). In the case of the CHAEA, \(N=80\), \(PossibleAnsuers_{i}=\{False,True\}\forall i\in\{1..N\}\), (so that \(|PossibleAnsuers_{i}|=2\)), and the non-selection of an answer could be considered \(False\). For humans, the concept of probability is usually more understandable than entropy.