1 Introduction

Uncertainty theory, founded by Liu (2007) and perfected by Liu (2009), has been successfully applied to many fields, such as science, engineering, finance, environment, etc. Among the different applications, uncertain statistics was first introduced by Liu (2010) as a set of mathematical methods to collect, analyze and interpret data based on uncertainty theory. As a part of uncertain statistics, uncertain hypothesis test is a statistical tool based on uncertainty theory to determine whether some hypotheses are correct or not according to observed data. This work was initialized by Ye and Liu (2022). Following that, uncertain hypothesis test has been applied to other research areas of uncertain statistics, including uncertain regression analysis and uncertain time series analysis.

Uncertain regression analysis is used to explore the relationship between explanatory variables and response variables with uncertainty theory. Yao and Liu (2018) first proposed that the disturbance term of a regression model is not a random variable but an uncertain variable, which marks the beginning of the uncertain regression analysis. On this basis, Lio and Liu (2018) explored to estimate the uncertain disturbance term and obtained an interval estimation for predicting the response variables. In order to test whether an uncertain regression model is a good fit to observed data, Ye and Liu (2022) proposed a test method based on uncertain hypothesis test. As applications of uncertain regression analysis and uncertain hypothesis test, Liu (2021b) used the uncertain growth model to study the number of COVID-19 infections in China, and Ye (2022a) used the linear uncertain regression model to explore the relationship between labour income share and four influence factors, including trade openness, financial development, government intervention and industrial structure.

Uncertain time series analysis is used to predict future values via the previously observed values based on uncertainty theory. Yang and Liu (2019) first presented that the disturbance term of a time series model is an uncertain variable instead of a random variable, which marks the beginning of the uncertain time series analysis. In order to test whether an uncertain time series model is a good fit to observed data, Ye (2022b) proposed a test method based on uncertain hypothesis test. As applications of uncertain time series analysis and uncertain hypothesis test, Ye and Yang (2021) studied the number of COVID-19 infections in China, Ye (2022c) discussed the birth rates in China, and Ye (2022d) investigated the grain yield in China.

As another part of uncertain statistics, uncertain differential equation (Liu 2008) is used to model the time evolution of a dynamic system. When using uncertain differential equation in practice, we first need to estimate unknown parameters in an uncertain differential equation to fit observed data as much as possible based on uncertainty theory. For that purpose, Yao and Liu (2020) first proposed the moment estimation based on the difference scheme of uncertain differential equation. Following that, Yang et al. (2020) presented the minimum cover estimation, Sheng et al. (2020) investigated the least squares estimation, and Liu and Liu (2022) introduced the maximum likelihood estimation. However, the above parameter estimation methods of uncertain differential equation based on difference scheme are not suitable for the case where the interval times between observations are not short enough. In order to deal with this problem, Liu and Liu (2022) presented the concept of residual to establish a connection between uncertain differential equation and observed data, and proposed a new method of parameter estimation in uncertain differential equation based on residuals. Up to now, uncertain differential equation has been widely applied in many fields such as finance (Liu 2013), chemical reaction (Tang and Yang 2021), electric circuit (Liu 2021a), pharmacokinetics (Liu and Yang 2021), software reliability (Liu and Kang 2022), COVID-19 (Lio and Liu 2021), Alibaba stock (Liu and Liu 2022) and so on.

With the help of residuals, this paper employs uncertain hypothesis test to determine whether an uncertain differential equation is a good fit to the observed data. The rest of the paper is organized as follows. Section 2 introduces some basic knowledge about uncertain hypothesis test. After that, uncertain hypothesis test is used to determine whether a set of observed data follow a given linear uncertainty distribution in Sect. 3. On this basis, Sect. 4 provides a method to test whether an uncertain differential equation fits the observed data, and gives two numerical examples to illustrate the test method. In Sect. 5, uncertain currency model is applied to USD–CNY exchange rates. Then, some conclusions are made in Sect. 6. Finally, as a comparison with uncertain currency model in Sect. 5, stochastic currency model is also applied to USD–CNY exchange rates in the appendix, and the results show that the uncertain currency model fits the exchange rates well, but the stochastic currency model does not.

2 Preliminaries

This section will introduce some basic knowledge of uncertain hypothesis test. Let \(\xi \) be an uncertain variable with uncertainty distribution \(\Phi _{\theta }\) where \(\theta \) is an unknown parameter. Consider the following hypotheses:

$$\begin{aligned} H_0: \theta =\theta _0\quad \text {versus}\quad H_1:\theta \ne \theta _0 \end{aligned}$$

where \(H_0\) is called a null hypothesis, and \(H_1\) is called an alternative hypothesis. Assume

$$\begin{aligned} z_1,z_2,\ldots ,z_n \end{aligned}$$

are a set of observed data of the uncertain variable \(\xi \). A rejection region for the null hypothesis \(H_0\) is a set \(W\subset \Re ^n\). If the vector of observed data belongs to the rejection region W, i.e.,

$$\begin{aligned} (z_1,z_2,\ldots ,z_n)\in W, \end{aligned}$$

then we reject \(H_0\). Otherwise, we accept \(H_0\). A core problem is how to choose a suitable rejection region W for the given hypothesis \(H_0\).

Definition 1

(Ye and Liu 2022) Let \(\xi \) be a population with uncertainty distribution \(\Phi _{\theta }\) where \(\theta \) is an unknown parameter. A rejection region \(W\subset \Re ^n\) is said to be a test for the two-sided hypotheses \(H_0: \theta =\theta _0\) versus \(H_1: \theta \ne \theta _0\) at significance level \(\alpha \) if

  1. (i)

    for any \((z_1,z_2,\ldots ,z_n)\in W\), there are at least \(\alpha \) of indexes i’s with \(1\le i\le n\) such that

  2. (ii)

    for some \(\theta \ne \theta _0\) and some \((z_1,z_2,\ldots ,z_n)\in W\), there are more than \(1-\alpha \) of indexes i’s with \(1\le i\le n\) and at least \(\alpha \) of indexes j’s with \(1\le j\le n\) such that

In order to test whether a normal uncertainty distribution \(\mathcal {N}(e_0,\sigma _0)\) is a good fit to a set of observed data \(z_1,z_2,\ldots ,z_n\), Ye and Liu (2022) proved by Definition 1 that a test at significance level \(\alpha \) is

$$\begin{aligned} \begin{aligned} W=\bigg \{(z_1,z_2&,\ldots ,z_n): \text { there are at least } \alpha \text { of indexes } i\text {'s with } 1\le i\le n \\&\text {such that }z_i<\Phi _0^{-1}\left( \frac{\alpha }{2}\right) \text { or } z_i>\Phi _0^{-1}\left( 1-\frac{\alpha }{2}\right) \bigg \} \end{aligned} \end{aligned}$$

where \(\Phi _0^{-1}\) is the inverse uncertainty distribution of \(\mathcal {N}(e_0,\sigma _0)\), i.e.,

$$\begin{aligned} \Phi _0^{-1}(\alpha )=e_0+\frac{\sigma _0\sqrt{3}}{\pi }\ln \frac{\alpha }{1-\alpha }. \end{aligned}$$

If the vector of observed data belongs to the test W, i.e.,

$$\begin{aligned} (z_1,z_2,\ldots ,z_n)\in W, \end{aligned}$$

then the normal uncertainty distribution \(\mathcal {N}(e_0,\sigma _0)\) is not a good fit to the observed data. Otherwise, the normal uncertainty distribution \(\mathcal {N}(e_0,\sigma _0)\) is a good fit to the observed data.

3 Uncertain hypothesis test for linear uncertainty distribution

In this section, we would like to use the uncertain hypothesis test to determine whether a set of observed data follow a given linear uncertainty distribution.

Theorem 1

Let \(\xi \) be an uncertain variable that follows a linear uncertainty distribution \(\mathcal {L}(a,b)\) with unknown parameters a and b. Then the test for the hypotheses

$$\begin{aligned} H_0: a=a_0 ~\text {and}~b=b_0\quad \text {versus}\quad H_1: a\ne a_0~\text {or}~b\ne b_0 \end{aligned}$$

at significance level \(\alpha \) is

$$\begin{aligned} \begin{aligned} W=\bigg \{(z_1,z_2&,\ldots ,z_n): \text { there are at least } \alpha \text { of indexes } i\text {'s with } 1\le i\le n \\&\text {such that }z_i<\Phi _0^{-1}\left( \frac{\alpha }{2}\right) \text { or } z_i>\Phi _0^{-1}\left( 1-\frac{\alpha }{2}\right) \bigg \} \end{aligned} \end{aligned}$$

where \(\Phi _0^{-1}\) is the inverse uncertainty distribution of \(\mathcal {L}(a_0,b_0)\), i.e.,

$$\begin{aligned} \Phi _0^{-1}(\alpha )=(1-\alpha )a_0+\alpha b_0. \end{aligned}$$

Proof

In order to prove that W is a test, we need to verify that W simultaneously meets Conditions (i) and (ii) in Definition 1. For any \((z_1,z_2,\ldots ,z_n)\in W\), it follows from the definition of W that there are at least \(\alpha \) of indexes i’s with \(1\le i\le n\) such that

$$\begin{aligned} z_i<\Phi _0^{-1}\left( \frac{\alpha }{2}\right) \text { or } z_i>\Phi _0^{-1}\left( 1-\frac{\alpha }{2}\right) , \end{aligned}$$

i.e.,

Thus W meets Condition (i) in Definition 1.

In order to prove Condition (ii), we take

$$\begin{aligned} a_1=\frac{3a_0-b_0}{2},\quad b_1=\frac{a_0+b_0}{2} \end{aligned}$$

and

$$\begin{aligned} z_i=a_0,\quad i=1,2,\ldots ,n. \end{aligned}$$

It is clear that \((z_1,z_2,\ldots ,z_n)\in W\). Let \(\Phi _1\) denote the uncertainty distribution of \(\mathcal {L}(a_1,b_1)\). On the one hand, we have

\(i=1,2,\ldots ,n\). Thus

On the other hand, we have

Thus

\(i,j=1,2,\ldots ,n\). Therefore W meets Condition (ii) in Definition 1. \(\square \)

Example 1

Let us use uncertain hypothesis test to determine whether the linear uncertainty distribution \(\mathcal {L}(0,1)\) fits the 30 observed data

$$\begin{aligned} \begin{array}{cccccccccc} 0.607 &{}0.808 &{}0.909 &{}0.989 &{}0.830 &{}0.938 &{}0.737 &{}0.676 &{}0.838 &{}0.690\\ 0.627 &{}0.652 &{}0.708 &{}0.616 &{}0.379 &{}0.594 &{}0.542 &{}0.079 &{}0.118 &{}0.330\\ 0.156 &{}0.235 &{}0.039 &{}0.052 &{}0.255 &{}0.039 &{}0.365 &{}0.213 &{}0.480 &{}0.500\\ \end{array} \end{aligned}$$

plotted in Fig. 1.

Fig. 1
figure 1

Observed data of the linear uncertainty distribution \(\mathcal {L}(0,1)\) in chronological order

Suppose \(\Phi ^{-1}\) is the inverse uncertainty distribution of \(\mathcal {L}(0,1)\), i.e.,

$$\begin{aligned} \Phi ^{-1}(\alpha )=\alpha . \end{aligned}$$

Given a significance level \(\alpha =0.05\), we obtain

$$\begin{aligned} \Phi ^{-1}\left( \frac{\alpha }{2}\right) =0.025,\quad \Phi ^{-1}\left( 1-\frac{\alpha }{2}\right) =0.975. \end{aligned}$$

It follows from \(\alpha \times 30=1.5\) and Theorem 1 that the test is

$$\begin{aligned}\begin{aligned} W=\{(z_1,z_2,\ldots ,&z_{30}): \text { there are at least } 2 \text { of indexes } i\text {'s with } 1\le i\le 30 \\&\text {such that }z_i<0.025 \text { or } z_i>0.975\}. \end{aligned} \end{aligned}$$

Since only the 4th observed datum \(0.989\notin [0.025,0.975]\), the vector of observed data does not belong to W. Thus the linear uncertainty distribution \(\mathcal {L}(0,1)\) is a good fit to the observed data.

Example 2

Let us use uncertain hypothesis test to determine whether the linear uncertainty distribution \(\mathcal {L}(5,6)\) fits the 30 observed data

$$\begin{aligned} \begin{array}{cccccccccc} 5.149&{} 5.307&{} 5.227&{} 5.290&{} 5.203&{} 5.014&{} 5.240&{} 5.104&{} 5.238&{} 5.374\\ 5.322&{} 5.397&{} 5.692&{} 5.311&{} 5.364&{} 5.617&{} 5.351&{} 5.240&{} 5.731&{} 5.472\\ 5.552&{} 5.960&{} 5.834&{} 5.831&{} 5.944&{} 5.985&{} 5.754&{} 5.908&{} 5.909&{} 5.680\\ \end{array} \end{aligned}$$

plotted in Fig. 2.

Fig. 2
figure 2

Observed data of the linear uncertainty distribution \(\mathcal {L}(5,6)\) in chronological order

Suppose \(\Phi ^{-1}\) is the inverse uncertainty distribution of \(\mathcal {L}(5,6)\), i.e.,

$$\begin{aligned} \Phi ^{-1}(\alpha )=\alpha +5. \end{aligned}$$

Given a significance level \(\alpha =0.05\), we obtain

$$\begin{aligned} \Phi ^{-1}\left( \frac{\alpha }{2}\right) =5.025,\quad \Phi ^{-1}\left( 1-\frac{\alpha }{2}\right) =5.975. \end{aligned}$$

It follows from \(\alpha \times 30=1.5\) and Theorem 1 that the test is

$$\begin{aligned}\begin{aligned} W=\{(z_1,z_2,\ldots ,&z_{30}): \text { there are at least } 2 \text { of indexes } i\text {'s with } 1\le i\le 30 \\&\text {such that }z_i<5.025 \text { or } z_i>5.975\}. \end{aligned} \end{aligned}$$

Since the 6th and 26th observed data \(5.014,5.985\notin [5.025,5.975]\), the vector of observed data belongs to W. Thus the linear uncertainty distribution \(\mathcal {L}(5,6)\) is not a good fit to the observed data.

4 Uncertain differential equation

In this section, we would like to employ the uncertain hypothesis test to determine whether an uncertain differential equation fits the observed data well. Consider an uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=f(t,X_t)\mathrm{d}t+g(t,X_t)\mathrm{d}C_t \end{aligned}$$
(1)

where f and g are known continuous functions, and \(C_t\) is a Liu process. Assume

$$\begin{aligned} x_{t_1},x_{t_2},\ldots ,x_{t_n} \end{aligned}$$
(2)

are observed values of some uncertain process \(X_t\) at times \(t_1,t_2,\ldots ,t_n\) with \(t_1<t_2<\cdots <t_n\), respectively. For each index i (\(2\le i\le n\)), let \(X_{t_i}\) be the solution of the updated uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=f(t,X_t)\mathrm{d}t+g(t,X_t)\mathrm{d}C_t,\quad X_{t_{i-1}}=x_{t_{i-1}} \end{aligned}$$
(3)

at time \(t_i\). Denote the uncertainty distribution of \(X_{t_i}\) by \(\Phi _{t_i}\). It is clear that

$$\begin{aligned} \Phi _{t_i}(X_{t_i}) \end{aligned}$$
(4)

is a linear uncertain variable \(\mathcal {L}(0,1)\) whose uncertainty distribution is

$$\begin{aligned} \Psi (x)={\left\{ \begin{array}{ll} 0, &{}\text {if}~x\le 0\\ x, &{}\text {if}~0<x\le 1\\ 1, &{}\text {if}~1<x, \end{array}\right. } \end{aligned}$$

and inverse uncertainty distribution is

$$\begin{aligned} \Psi ^{-1}(\alpha )=\alpha . \end{aligned}$$

Then, Liu and Liu (2022) called

$$\begin{aligned} \varepsilon _i=\Phi _{t_i}(x_{t_i}) \end{aligned}$$
(5)

the ith residual of the uncertain differential equation (1) corresponding to the observed data (2) by substituting \(X_{t_i}\) with the observed value \(x_{t_i}\) in (4). Thus the residual \(\varepsilon _i\) may be regraded as a sample of the linear uncertainty distribution \(\mathcal {L}(0,1)\).

If the uncertain differential equation (1) does fit the observed data (2) well, then the \(n-1\) residuals \(\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\) should follow the linear uncertainty distribution \(\mathcal {L}(0,1)\), i.e.,

$$\begin{aligned} \varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\sim \mathcal {L}(0,1). \end{aligned}$$

Thus, to test whether the uncertain differential equation (1) fits the observed data (2) well, we should test whether the linear uncertainty distribution \(\mathcal {L}(0,1)\) fits the residuals \(\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\) defined in (5), i.e.,

$$\begin{aligned} \varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\sim \mathcal {L}(0,1). \end{aligned}$$

To do so, it follows from Theorem 1 that the test at a given significance level \(\alpha \) (e.g. 0.05) is

$$\begin{aligned} \begin{aligned} W=\bigg \{(z_2,z_3,\ldots ,&z_n): \text { there are at least } \alpha \text { of indexes } i\text {'s with } 2\le i\le n\\&\text {such that }z_i<\frac{\alpha }{2} \text { or } z_i>1-\frac{\alpha }{2}\bigg \}. \end{aligned} \end{aligned}$$

If the vector of the \(n-1\) residuals \(\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\) belongs to the test W, i.e.,

$$\begin{aligned} (\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n)\in W, \end{aligned}$$

then the uncertain differential equation (1) is not a good fit to the observed data (2). If

$$\begin{aligned} (\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n)\notin W, \end{aligned}$$

then the uncertain differential equation (1) is a good fit to the observed data (2).

Example 3

Let us employ the uncertain hypothesis test to determine whether the uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=X_t\mathrm{d}t+2X_t\mathrm{d}C_t \end{aligned}$$
(6)

fits the 30 observed data in Table 1 on the time horizon from 0 to 2.19.

Table 1 Observed data in Example 3

In Table 1, denote the observed values of \(X_t\) at times \(t_1,t_2,\ldots ,t_{30}\) by

$$\begin{aligned} x_{t_1},x_{t_2},\ldots ,x_{t_{30}}, \end{aligned}$$

respectively. For each index i (\(2\le i\le 30\)), we solve the updated uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=X_t\mathrm{d}t+2X_t\mathrm{d}C_t,\quad X_{t_{i-1}}=x_{t_{i-1}} \end{aligned}$$

and obtain the uncertainty distribution of \(X_{t_i}\) as follows,

$$\begin{aligned} \Phi _{t_i}(x)=\left( 1+\exp \left( \frac{\pi (t_i-t_{i-1}+\ln x_{t_{i-1}}-\ln x)}{2\sqrt{3}(t_i-t_{i-1})}\right) \right) ^{-1}. \end{aligned}$$

It follows from (5) that the ith residual is

$$\begin{aligned} \varepsilon _i=\left( 1+\exp \left( \frac{\pi (t_i-t_{i-1}+\ln x_{t_{i-1}}-\ln x_{t_i})}{2\sqrt{3}(t_i-t_{i-1})}\right) \right) ^{-1}. \end{aligned}$$

See Fig. 3. In order to test whether the uncertain differential equation (6) fits the observed data well, we should test whether the linear uncertainty distribution \(\mathcal {L}(0,1)\) fits the 29 residuals \(\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _{30}\). Given a significance level \(\alpha =0.05\), it follows from \(\alpha \times 29=1.45\) and Theorem 1 that the test is

$$\begin{aligned} \begin{aligned} W=\{(z_2,z_3,\ldots ,z_{30})&: \text { there are at least } 2 \text { of indexes } i\text {'s with } 2\le i\le 30\\&\text {such that }z_i<0.025 \text { or } z_i>0.975\}. \end{aligned} \end{aligned}$$

Since only \(\varepsilon _{21}=0.983\notin [0.025,0.975]\), we have \((\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _{30})\notin W\). Thus the uncertain differential equation (6) is a good fit to the observed data.

Fig. 3
figure 3

Residual plot of uncertain differential equation (6)

Example 4

Let us employ the uncertain hypothesis test to determine whether the uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=(5-X_t)\mathrm{d}t+X_t\mathrm{d}C_t \end{aligned}$$
(7)

fits the 30 observed data in Table 2 on the time horizon from 0 to 9.5.

Table 2 Observed data in Example 4

In Table 2, denote the observed values of \(X_t\) at times \(t_1,t_2,\ldots ,t_{30}\) by

$$\begin{aligned} x_{t_1},x_{t_2},\ldots ,x_{t_{30}}, \end{aligned}$$

respectively. For each i (\(2\le i\le 30\)), we can calculate the residual \(\varepsilon _i\) of the updated uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=(5-X_t)\mathrm{d}t+X_t\mathrm{d}C_t,\quad X_{t_{i-1}}=x_{t_{i-1}} \end{aligned}$$

with the help of an algorithm proposed by Liu and Liu (2022). See Fig. 4. In order to test whether the uncertain differential equation (7) fits the observed data well, we should test whether the linear uncertainty distribution \(\mathcal {L}(0,1)\) fits the 29 residuals

$$\begin{aligned} \varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _{30}. \end{aligned}$$

Given a significance level \(\alpha =0.05\), it follows from \(\alpha \times 29=1.45\) and Theorem 1 that the test is

$$\begin{aligned} \begin{aligned} W=\{(z_2,z_3,\ldots ,z_{30})&: \text { there are at least } 2 \text { of indexes } i\text {'s with } 2\le i\le 30\\&\text {such that }z_i<0.025 \text { or } z_i>0.975\}. \end{aligned} \end{aligned}$$

Since only \(\varepsilon _{10}=0.987\notin [0.025,0.975]\), we have \((\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _{30})\notin W\). Thus the uncertain differential equation (7) is a good fit to the observed data.

Fig. 4
figure 4

Residual plot of uncertain differential equation (7)

5 Uncertain currency model

Example 5

Table 3 shows US Dollar to Chinese Yuan (USD–CNY) exchange rates (weekly average) in Forex Capital Markets (FXCM) from October 2019 to June 2021, which are plotted in Fig. 5.

Table 3 USD–CNY exchange rates (weekly average) from October 1, 2019 to June 30, 2021

Let \(i=1,2,\ldots ,91\) represent the weeks from October 1, 2019 to June 30, 2021, and denote the exchange rates by

$$\begin{aligned} x_1,x_2,\ldots ,x_{91}. \end{aligned}$$

Assume the exchange rate \(X_t\) follows the uncertain differential equation

$$\begin{aligned} \mathrm{d}X_t=(m-aX_t)\mathrm{d}t+\sigma \mathrm{d}C_t \end{aligned}$$
(8)
Fig. 5
figure 5

USD–CNY exchange rates (weekly average) from October 1, 2019 to June 30, 2021

where m, a and \(\sigma \) are unknown parameters to be estimated, and \(C_t\) is a Liu process. Then, Liu and Liu (2022) suggested that the moment estimate \((m, a,\sigma )\) is the solution of the system of equations,

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle \frac{1}{90}\sum \nolimits _{i=2}^{91}\varepsilon _i(m, a,\sigma )=\frac{1}{2}\\ \displaystyle \frac{1}{90}\sum \nolimits _{i=2}^{91}\varepsilon ^2_i(m, a,\sigma )=\frac{1}{3}\\ \displaystyle \frac{1}{90}\sum \nolimits _{i=2}^{91}\varepsilon ^3_i(m, a,\sigma )=\frac{1}{4}\\ \end{array} \right. \end{aligned}$$

where

$$\begin{aligned} \varepsilon _i(m, a,\sigma )=\left( 1+\exp \left( \frac{\pi ((ax_{i-1}-m)\exp (-a)+m-ax_i)}{\sqrt{3}\sigma (1-\exp (-a))}\right) \right) ^{-1}, \end{aligned}$$

\(i=2,3,\ldots ,91\) are residuals of the uncertain differential equation (8). Solving the above system of equations, we get

$$\begin{aligned} m=1.4448,\quad a=0.2136,\quad \sigma =0.0775. \end{aligned}$$

Thus we obtain an uncertain currency model

$$\begin{aligned} \mathrm{d}X_t=(1.4448-0.2136X_t)\mathrm{d}t+0.0775\mathrm{d}C_t \end{aligned}$$
(9)

where \(X_t\) represents the exchange rate.

Finally, let us test whether the uncertain currency model (9) fits USD–CNY exchange rates. That is, we should test whether the linear uncertainty distribution \(\mathcal {L}(0,1)\) fits the 90 residuals

$$\begin{aligned} \varepsilon _i(1.4448, 0.2136,0.0775),~i=2,3,\ldots ,91. \end{aligned}$$

See Fig. 6.

Fig. 6
figure 6

Residual plot of the uncertain currency model (9) corresponding to USD–CNY exchange rates

Given a significance level \(\alpha =0.05\), it follows from \(\alpha \times 90=4.5\) and Theorem 1 that the test is

$$\begin{aligned} \begin{aligned} W=\{(z_2,z_3,\ldots ,z_{91})&: \text { there are at least } 5 \text { of indexes } i\text {'s with } 2\le i\le 91\\&\text {such that }z_i<0.025 \text { or } z_i>0.975\}. \end{aligned} \end{aligned}$$

Since all residuals \(\varepsilon _i\), \(i=2,3,\ldots ,91\) are between 0.025 and 0.975, we have

$$\begin{aligned} (\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _{91})\notin W. \end{aligned}$$

Thus the uncertain currency model (9) is a good fit to USD–CNY exchange rates.

6 Conclusion

In order to test whether an uncertain differential equation fits the observed data well, this paper presented the uncertain hypothesis test to determine whether the uncertain differential equation is a good fit to the observed data by testing whether the residuals of the uncertain differential equation follow the linear uncertainty distribution \(\mathcal {L}(0,1)\). Then, some numerical examples were given to demonstrate the test method. Finally, both uncertain currency model and stochastic currency model were applied to USD–CNY exchange rates. The results showed that the uncertain currency model fits the exchange rates well, but the stochastic currency model does not.