Next Article in Journal
Methodology for the Design and Verification of a Securing Structure for Transporting Cylindrical Rollers on Load Bogies
Previous Article in Journal
Parameters Characterizing the Performance of Automotive Electronic Control Systems on Petrol Engine Emissions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Case Study of Binary Hypothesis Test Using ML †

1
Department of Finance, National Central University, Taoyuan 320, Taiwan
2
Department of Information Engineering and Computer Science, Feng Chia University, Taichung 407, Taiwan
*
Author to whom correspondence should be addressed.
Presented at the 2024 Cross Strait Conference on Social Sciences and Intelligence Management, Shanghai, China, 13–15 December 2024.
Eng. Proc. 2025, 98(1), 37; https://doi.org/10.3390/engproc2025098037
Published: 14 July 2025

Abstract

Artificial intelligence has attracted much attention due to its learning capability to solve versatile problems. Using a convolutional neural network in machine learning (ML), we investigated the binary hypothesis test, which is a fundamental problem in management and business. The simulation results showed that the proposed method is comparable with the conventional optimum likelihood ratio test for the aspect of type I and II errors. Moreover, the learning capability of ML is promising for complicated data, the properties of which, such as probability distribution and/or statistical data, i.e., mean, variance, and others, are not known.

1. Introduction

The binary hypothesis test is used to select better hypotheses between H 0 and H 1 infers based on measurement data. Many applications are used in management and business [1,2], communications [3,4], and biology [5,6,7]. The hypothesis test enables the analysis and evaluation of the causes and effects of important management decisions. Using the hypothesis test, data-driven decision-makers translate data into their business strategy.
Traditionally, the hypothesis test is conducted using the Bayesian approach. Recently, machine learning (ML) has attracted considerable attention due to its outstanding classification capability using features embedded in observed data. Characterized by the use of data and algorithms, ML is used to solve problems by imitating the way that humans learn and improve their performance (or intelligence). Convolutional neural networks (CNNs) [8,9] are popular deep learning technologies that are often used in image or speech recognition, object detection, and other fields. Compared with the traditional multilayer perceptron (MLP), the CNN introduces the concept of windows. This allows the CNN to effectively capture high-level features of the data observed through these windows. CNNs usually contain various layers, such as convolutional layers, activation functions, pooling layers, and fully connected layers [8].
In contrast to the conventional likelihood ratio test, we studied the binary hypothesis test using the ML approach. Using the CNN, a solution was proposed, and the results were compared with that of the optimum likelihood ratio test in this study. Consequently, the learning capability of CNN models is promising for solving the considered problem of binary hypothesis tests in wide applications.
The rest of this article is organized as follows. Section 2 introduces the problem. Section 3 presents two case studies employing the conventional likelihood ratio test. Section 4 introduces the proposed CNN scheme, and Section 5 demonstrates simulation results and concludes this study.

2. Problem Formulation

Without a loss of generality, the binary hypothesis test was investigated, assuming that data were sampled from the stationary Gaussian random process. Therefore, the joint probability density function (PDF) of N data samples x = x 0 , x 1 x N 1 T under hypothesis H i , I = 0, 1, was expressed as follows:
f x H i = n = 0 N 1 e x p 1 2 x n μ i σ i 2 σ i 2 π
where x n denotes data samples; n = 0, 1, …, N − 1; denotes the product operation; μ i and σ i denote the mean and standard deviation of x n under hypothesis H i , respectively; and μ 1 > μ 0 . Given the data samples, the true hypothesis must be selected. That is, based on x and its joint PDF(1), the most probable hypothesis is inferred as follows:
H 0 : x ~ f x H 0 H 1 : x ~ f x H 1 .

3. Case Study Using Likelihood Ratio Test

We explored two cases using the likelihood ratio test.

3.1. Case A: Different Mean with Same Variance

Since mean and variance are basic statistics of Gaussian random variables, their effects on the considered problem were studied. First, we investigated a simple condition with a different mean and the same variance, i.e., μ 0 μ 1 ( μ 1 > μ 0 ) and σ 0 2 = σ 1 2 . According to the likelihood ratio test,
f ( x | H 1 ) H 1 H 0 f   ( x | H 0 )
After several manipulations, Equation (4) was used.
1 N n = 0 N 1 x n   H 1 H 0 η A
where η A = μ 0 + μ 1 2 .
The decision metrics (Equation (4)) are comprehensive. When the average value of x is less than η A (or the average value of means μ 0 and μ 1 ), H 0 is decided; otherwise, H 1 is inferred.
Under H 0 (i.e., x n ~ μ 0 ,   σ 0 2 , n ), let y A 1 N n = 0 N 1 x n ; one has y A ~ μ y A ,   σ y A 2 , where · denotes the PDF of a Gaussian random variable, μ y A = μ 0 is the mean of y A , and σ y A 2 = σ 0 2 / N is the variance of y A . Therefore, the type I error of case A, α A , can be subsequently written as follows:
α A = P r o b y A > η A = η A e x p 1 2 y A μ y A σ y A 2 σ y A 2 π d y A
where P r o b · denotes the probability.
Apparently, α A does not have the closed-form expression. However, since z A = y A μ y A σ y A has the standard normal distribution, α A is rewritten as follows:
α A = P r o b y A μ y A σ y A > η A μ y A σ y A = Q η A μ y A σ y A ,
where Q · denotes the Q function, i.e.,
Q x = x e x p 1 2 u 2 2 π d u .
Under H 1 (i.e., x n ~ μ 1 ,   σ 1 2 , n ), let y A 1 N n = 0 N 1 x n ; one has y A ~ μ y A ,   σ y A 2 , where · denotes the PDF of a Gaussian random variable, μ y A = μ 1 is the mean of y A , and σ y A 2 = σ 1 2 / N is the variance of y A . Therefore, the type II error of case A, β A , can be subsequently written as follows:
β A = P r o b y A < η A = η A μ y A σ y A e x p 1 2 z A 2 2 π d z A
where z A = y A μ y A σ y A . Let w A = z A :
β A = η A μ y A σ y A e x p 1 2 w A 2 2 π d w A = Q η A μ y A σ y A .

3.2. Case B: Different Mean with Different Variance

In this general case, μ 0 μ 1 ( μ 1 > μ 0 ) and σ 0 2 σ 1 2 . According to the likelihood ratio test (Equation (3)), after several manipulations, the following is derived:
n = 0 N 1 x n μ 0 σ 0 2 n = 0 N 1 x n μ 1 σ 1 2   H 1 H 0 η B
where η B = 2 N l n σ 1 σ 0 and l n · denote the natural logarithm function.
Even though the decision metric (Equation (10)) is not concise, it is enough to be used as the algorithm of the likelihood ratio test for case B. Since the exact distributions of the decision metric under both hypotheses are involved, we derived their asymptotical expressions when N was large. Hence, under H 0 (i.e., x n ~ μ 0 ,   σ 0 2 , n ), let y B n = 0 N 1 x n μ 0 σ 0 2 and w B n = 0 N 1 x n μ 1 σ 1 2 ; according to the central limit theorem, one has y B ~ μ y B ,   σ y B 2 and w B ~ μ w B ,   σ w B 2 , where μ y B = N , σ y B 2 = 2 N , μ w B = N σ 0 2 σ 1 2 + N μ 0 μ 1 2 σ 1 2 , σ w B 2 = 2 N σ 0 4 σ 1 4 + 4 N μ 0 μ 1 2 σ 0 2 σ 1 4 (Appendix A).
Let z B = y B w B , then z B ~ μ z B , σ z B 2 , where μ z B = N 1 σ 0 2 σ 1 2 N μ 0 μ 1 2 σ 1 2 and σ z B 2 = 2 N + 2 N σ 0 4 σ 1 4 + 4 N μ 0 μ 1 2 σ 0 2 σ 1 4 4 N σ 0 2 σ 1 2 (Appendix B). Therefore, the type I error of case B, α B , is written as follows:
α B = P r o b z B > η B = Q η B μ z B σ z B .
Under H 1 (i.e., x n ~ μ 1 , σ 1 2 , n ), the statistics of y B = n = 0 N 1 x n μ 0 σ 0 2 and w B n = 0 N 1 x n μ 1 σ 1 2 are similar to y B ~ μ y B , σ y B 2 and w B ~ μ w B , σ w B 2 , where μ y B = N σ 1 2 σ 0 2 + N μ 1 μ 0 2 σ 0 2 , σ y B 2 = 2 N σ 1 4 σ 0 4 + 4 N μ 1 μ 0 2 σ 1 2 σ 0 4 , μ w B = N , and σ w B 2 = 2 N . Additionally, let z B = y B w B , then z B ~ μ z B , σ z B 2 , where μ z B = N σ 1 2 σ 0 2 1 + N μ 1 μ 0 2 σ 0 2 and σ z B 2 = 2 N + 2 N σ 1 4 σ 0 4 + 4 N μ 1 μ 0 2 σ 1 2 σ 0 4 4 N σ 1 2 σ 0 2 . Therefore, the type II error of case B, β B , can be written as follows:
β B = P r o b z B < η B = Q η B μ z B σ z B .

4. Proposed ML Based on CNN

Table 1 presents the proposed CNN structure for the considered hypothesis test with N = 40. The stride and activation functions of the CNN are one and ReLU, respectively. Compared with the conventional optimum likelihood ratio test, the probability distribution and/or statistical properties of the data samples are not required by CNNs. However, training data and their correct classifications (or labels) are necessary for the ML.

5. Discussion and Conclusions

Monte Carlo simulations were used to assess the performance of binary hypothesis tests using different approaches in this study. For case A, 20,000 sets of input data were evenly sampled from the Gaussian random variables with μ 0 ,   σ 0 2 = ( 0.15 , 1 ) and μ 1 ,   σ 1 2 = ( 0.15 , 1 ) for H 0 and H 1 , respectively. Each set had N data samples. On the contrary, for case B, 20,000 sets of input data were also evenly sampled from the Gaussian random variables with μ 0 ,   σ 0 2 = ( 0.15 , 1 ) and μ 1 ,   σ 1 2 = ( 0.15 , 1.1 ) for H 0 and H 1 , respectively. In each case, we divided all sample data into two datasets for the proposed CNN: training data (80%) and testing data (20%).
Figure 1a,b present the type I error plotted against the sample number, N, of the proposed ML based on the CNN, as well as the theoretical and simulation results of the likelihood ratio test for cases A and B, respectively. All performances produced similar results. This confirms that the proposed CNN performed similarly to the conventional optimum likelihood ratio test. Notably, similar results were observed for the type II error, which is omitted here.
This trial confirmed that the proposed CNN can be adopted for binary decision-making. Accompanied by the sampling method, the learning capability of ML is appropriate for the classification problem with an unknown probability distribution and statistical data, i.e., the mean and variance. By integrating deep learning technology, ML is used for common and/or complicated data, which do not require any confirmed statistical properties.

Author Contributions

Conceptualization, S.-H.C.; methodology, S.-H.C. and C.-Y.C.; validation, C.-Y.C.; formal analysis, S.-H.C.; writing, S.-H.C. and C.-Y.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All research data were obtained through MATLAB R2012a.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Derivations of μ y B , σ y B 2 , μ w B , and σ w B 2 under H 0 :
By definition,
μ y B = E y B = n = 0 N 1 E x n μ 0 2 σ 0 2 = N ,
where E · denotes the expectation operator. In addition,
E y B 2 = E n = 0 N 1 x n μ 0 2 σ 0 2 m = 0 N 1 x m μ 0 2 σ 0 2 = 1 σ 0 4 n = 0 N 1 E x n μ 0 4 + 1 σ 0 4 n = 0 N 1 m = 0 m n N 1 E x n μ 0 2 E x m μ 0 2 .
Remember that
E x n μ 0 p = 0 , if   p   is   odd σ 0 p k = 1 p / 2 ( 2 k 1 ) , if   p   is   even .
Hence,
E y B 2 = N ( N + 2 ) .
Therefore, using Equations (13) and (16),
σ y B 2 = E y B 2 μ y B 2 = 2 N .
Similarly, we obtained
μ w B = E w B = n = 0 N 1 E x n μ 1 2 σ 1 2 = N σ 0 2 σ 1 2 + N μ 0 μ 1 2 σ 1 2
and
σ w B 2 = E w B 2 μ w B 2 = 2 N σ 0 4 σ 1 4 + 4 N μ 0 μ 1 2 σ 0 2 σ 1 4 .

Appendix B

Derivation of σ z B 2 :
Since z B = y B w B and y B and w B are correlated,
σ z B 2 = σ y B 2 + σ w B 2 2 C o v y B , w B
where
C o v y B , w B = E y B w B μ y B μ w B .
Additionally,
E y B w B = n = 0 N 1 m = 0 N 1 E x n μ 0 σ 0 2 E x m μ 1 σ 1 2 = N N + 2 σ 0 2 σ 1 2 + N 2 μ 0 μ 1 2 1 σ 1 2 .
Finally, using Equations (13), (17)–(19), (20)–(22), one can determine the following:
σ z B 2 = 2 N + 2 N σ 0 4 σ 1 4 + 4 N μ 0 μ 1 2 σ 0 2 σ 1 4 4 N σ 0 2 σ 1 2 .

References

  1. Dayanik, S.; Sezer, S. Multisource Bayesian sequential binary hypothesis testing problem. Ann. Oper. Res. 2012, 201, 99–130. [Google Scholar] [CrossRef]
  2. Mehdi, I.K.E. An examination of the naive-investor hypothesis in accruals mispricing in Tunisian firms. J. Int. Financ. Manag. Account. 2011, 22, 131–164. [Google Scholar] [CrossRef]
  3. Chin, W.L. On the noise uncertainty for the energy detection of OFDM signals. IEEE Trans. Veh. Technol. 2019, 68, 7593–7602. [Google Scholar] [CrossRef]
  4. Chin, W.L.; Le, T.N.; Tseng, C.L. Authentication scheme for mobile OFDM based on security information technology of physical layer over time-variant and multipath fading channels. Inf. Sci. 2015, 321, 238–249. [Google Scholar] [CrossRef]
  5. Read, J.; Sharma, S. Hypothesis-driven science in large-scale studies: The case of GWAS. Biol. Philos. 2021, 36, 46. [Google Scholar] [CrossRef]
  6. Li, J.J.; Tong, X. Statistical hypothesis testing versus ML binary classification: Distinctions and guidelines. Patterns 2020, 1, 100115. [Google Scholar] [CrossRef] [PubMed]
  7. Wei, Z.; Yang, A.; Rocha, L.; Miranda, M.F.; Nathoo, F.S. A Review of Bayesian Hypothesis Testing and Its Practical Implementations. Entropy 2022, 24, 161. [Google Scholar] [CrossRef] [PubMed]
  8. Chinga, A.; Bendezu, W.; Angulo, A. Comparative Study of CNN Architectures for Brain Tumor Classification Using MRI: Exploring GradCAM for Visualizing CNN Focus. Eng. Proc. 2025, 83, 22. [Google Scholar] [CrossRef]
  9. Chin, W.L.; Lai, S.C.; Lin, S.W.; Chen, H.H. Pipelined neural network assisted mobility speed estimation over doubly-selective fading channels. IEEE Wirel. Commun. 2022, 31, 163–168. [Google Scholar] [CrossRef]
Figure 1. (a) Type I error of case A under H 0 , i.e., α A , for the proposed ML based on the CNN and the theoretical and simulation results of the likelihood ratio test; (b) type I error of case B under H 0 , i.e., α B , for the proposed ML based on the CNN and the theoretical and simulation results of the likelihood ratio test.
Figure 1. (a) Type I error of case A under H 0 , i.e., α A , for the proposed ML based on the CNN and the theoretical and simulation results of the likelihood ratio test; (b) type I error of case B under H 0 , i.e., α B , for the proposed ML based on the CNN and the theoretical and simulation results of the likelihood ratio test.
Engproc 98 00037 g001
Table 1. CNN-based binary hypothesis test with N = 40.
Table 1. CNN-based binary hypothesis test with N = 40.
LayerOutput DimensionsParameter Number
Input(40, 1)0
Convolution(40, 50)950
37,550
30,050
22,550
15,050
7550
Fully connected64128,064
322080
16528
8136
19
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chin, S.-H.; Chin, C.-Y. Case Study of Binary Hypothesis Test Using ML. Eng. Proc. 2025, 98, 37. https://doi.org/10.3390/engproc2025098037

AMA Style

Chin S-H, Chin C-Y. Case Study of Binary Hypothesis Test Using ML. Engineering Proceedings. 2025; 98(1):37. https://doi.org/10.3390/engproc2025098037

Chicago/Turabian Style

Chin, Shang-Hua, and Cheng-Yu Chin. 2025. "Case Study of Binary Hypothesis Test Using ML" Engineering Proceedings 98, no. 1: 37. https://doi.org/10.3390/engproc2025098037

APA Style

Chin, S.-H., & Chin, C.-Y. (2025). Case Study of Binary Hypothesis Test Using ML. Engineering Proceedings, 98(1), 37. https://doi.org/10.3390/engproc2025098037

Article Metrics

Back to TopTop