Recycled water wetland water quality risk factor probability screening method
By establishing a screening model and performing probability calculations, the problems of large amount of information and strong randomness in the water quality monitoring data are solved, and efficient screening and probability evaluation of water quality risk factors are achieved.
Patent Information
- Application Number
- CN202411697587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Due to the huge amount of information, large amount of information repetition and strong randomness of water quality monitoring data, it is difficult to effectively screen the impact of various random factors on water quality risk factors.
By establishing a screening model, calculating the matrix of the monitoring sample data, performing Bartret's normal distribution variance homogeneity test, and serially compute the parameters of the empirical normal distribution function, using these parameters for probability calculation, and screening the probability of water quality risk factors.
The probability evaluation of the impact of various random factors on water quality risk factors is achieved using existing monitoring data, which improves the efficiency and accuracy of water quality risk factor screening.
Smart Images

Figure CN119646058A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a water ecological water quality screening technology, and in particular to a method for probabilistic screening of water quality risk factors in a reclaimed water wetland. Background Art
[0002] Since environmental pollution and water ecological damage directly affect human survival and development, my country pays more and more attention to the protection of water ecology. After various types of polluted water are properly treated, the tail water of sewage treatment plants passes through artificial wetlands, and aquatic plants absorb nitrogen, phosphorus and other substances in the water, converting these into their own energy. At the same time, they also absorb heavy metals and toxic and harmful substances, playing a role in water purification. After water purification, water quality indicators can be improved, which can meet certain usage requirements and reach the water quality standards for recycled water for different purposes, so that water can be used for beneficial purposes. As a result, the monitoring and evaluation of recycled water quality as a branch of environmental science has also emerged and developed.
[0003] Since water quality monitoring data has a huge amount of information and is highly random, as the year progresses, the amount of information increases and the amount of repetition is also huge, and the difficulty of screening water quality index information affected by various random factors also increases. Therefore, it is very necessary to find a method that can use existing monitoring data to simply and clearly give the evaluation conclusion of the impact of various random factors on water quality risk factors. Summary of the invention
[0004] The present invention provides a method for probabilistic screening of water quality risk factors in reclaimed water wetlands.
[0005] The technical solution adopted by the present invention comprises the following steps:
[0006] (1) Establish the file for screening model calculation
[0007] 1) Establish screening model calculation data file
[0008] 1) With the number of monitoring samples as rows and the number of detection indicators of the samples as columns, the monitoring sample data is represented by a matrix. There are n water quality monitoring samples, which is called sample capacity, and each sample has m monitoring indicators, which is the dimension of the random variable;
[0009] II) Supplement the monitoring sample matrix;
[0010] III) Fill in the calculation data file;
[0011] 2) Sample name file
[0012] Paste the date column in the monitoring sample data arrangement table and rewrite the date in the first row as the standard value;
[0013] 3) Monitoring element name file;
[0014] Arrange the monitoring indicator names in columns;
[0015] (2) Perform Bartlett's normal distribution variance homogeneity test
[0016] (3) Parameters of the sequence calculation empirical normal distribution function
[0017] (4) Probability calculation using a sequence of empirical normal distribution functions
[0018] 1) The model convergence condition is that the relative error is less than 50% with a probability less than 10%;
[0019] 2) For probability greater than 10% and less than or equal to 25%, the relative error is <30%;
[0020] 3) For probability greater than 25% and less than or equal to 50%, the relative error is <20%;
[0021] 4) For probability greater than 65%, the relative error is <5%;
[0022] (5) Probability of screening water quality risk factors
[0023] ①The probability that the pollution index exceeds the standard value;
[0024] Select the sample probabilities and corresponding monitoring elements of each group of sequences in the fifth group;
[0025] ② Ranking of the probability of pollution indicators exceeding the standard value;
[0026] ③ Screening date and monitoring indicators of water quality risk factor threshold β that exceeds the probability threshold;
[0027] Combined with the sample name file, water quality risk factors that exceed the probability threshold, their probability of occurrence and corresponding dates can be screened out.
[0028] In the step (1) of the present invention, in which a screening model calculation file is established, the monitoring sample matrix is represented as an n×m-order matrix:
[0029] X=(X1,X2,…X j ,…X m ) T
[0030] X j is a column vector, j = 1, 2, ..., m, or
[0031] X=Ax (3)
[0032] A is a constant matrix of n×m order consisting of monitoring data A=[a1,a2…,a m ], aj (j=1,2,…,m) is the column vector expressing the monitoring data, x=(x1,x2,…,x m ) T is an m-dimensional random variable.
[0033] In the step (1) of the present invention, in the file for establishing the screening model calculation, 1) establishing the screening model calculation data file, and 2) supplementing the monitoring sample matrix with the following content:
[0034] A. Number the samples on the left side of the monitoring data matrix;
[0035] B. Add three rows at the top of the matrix, the first row is the name of the monitoring indicator, the second row is the number of the monitoring indicator, and the third row is the standard value of the monitoring indicator;
[0036] C. Add a column on the right side of the matrix for the monitoring date of the sample;
[0037] D. Add a row at the bottom of the matrix to determine the regulations for values greater than or less than the standard value.
[0038] In the step (1) of the present invention, the file for establishing the screening model calculation is: 1) establishing the screening model calculation data file, and III) filling in the calculation data file:
[0039] The first line of the data file contains the basic information and calculation requirements of the data, with spaces between the data. The first data is the number of samples + 1; the second data is the number of monitoring indicators that the samples participate in the calculation of + 1; the third data is the significance level α value of the Bartlett test; the fourth data is the probability threshold for the probability requirement of the specified screening risk factor; the fifth data is the number of probability sequence calculation groups to determine the availability of parameter estimates.
[0040] The step (2) of the present invention performs a Bartlett normal distribution variance homogeneity test, which includes:
[0041] Suppose that m samples are randomly selected independently from m normal populations, and the size of each sample is n. i , the sample variance is The hypothesis test is then:
[0042] The variances of the populations are not all equal.
[0043] Under the condition that H0 is established, the Bartlett test statistic is:
[0044]
[0045] in, It is called the pooled variance;
[0046] Given a confidence level of 1-α
[0047] If formula (2) is satisfied, then:
[0048] Then H0 is not rejected;
[0049] like Then reject H0 and accept H1;
[0050] If the conclusion is "do not reject the requirement of homogeneity of variance", the test passes.
[0051] The step (3) of the present invention sequentially calculates the parameters of the empirical normal distribution function:
[0052] When the sample size is n, for the random variable expressed by the m-dimensional monitoring data, the sequence number q = 5, the mathematical expectation of the normal distribution parameter is calculated by the formula (3) and standard deviation
[0053]
[0054] Then the average value is calculated, and the error is compared with the value obtained by i=n+(q-1).
[0055] The step (4) of the present invention uses a sequence of calculating empirical normal distribution functions to perform probability calculation, including:
[0056] Using mathematical expectation and standard deviation The value is taken as the normal distribution parameter, the standard value is taken as the origin, and the data is standardized using the following formula:
[0057]
[0058] Use the normal distribution function Φ(x) for probability calculation:
[0059]
[0060] Where h is a natural number.
[0061] In the step (5) of the present invention, the probability of screening water quality risk factors is as follows: ③ the date and monitoring index of the water quality risk factor threshold β exceeding the probability threshold is screened:
[0062] When screening water quality risk factors, the risk factor threshold β = Φ is required -1 (x), we can directly solve Φ using equation (2) -1 (x), the method is as follows:
[0063] Let Φ(β)=Φ0
[0064] Constructor g(x) = Φ(x) - Φ0
[0065] Obviously, g(β)=0
[0066] remember structure
[0067]
[0068] Using formula (2) we can directly obtain β = Φ -1 (x);
[0069] Substitute the required probability threshold into formula (2) to obtain the water quality risk factor threshold β of the probability threshold. Substitute the water quality risk factor threshold β into formula (16) to obtain the random variable index corresponding to the water quality risk factor threshold β,
[0070]
[0071] That is, the corresponding condition (16) is satisfied. The monitoring indicator data is the risk factor that exceeds the probability threshold. ij Substitute into equation (15) for normalization, and then substitute into equation (1).
[0072] The advantage of the present invention is that, in view of the characteristics of water quality monitoring data, such as large amount of information, large amount of information repetition, strong randomness and fixed position of monitoring data, the present invention classifies and analyzes the characteristics of information, compares common characteristics, satisfies the law of large numbers and the central limit theorem as the sufficient and necessary basis of the algorithm, applies the uniqueness relationship of characteristic functions, approximates the distribution function through the sequence empirical distribution function, and constructs an algorithm model based on probability statistics theory to screen wetland water quality risk factors with possible probability. The algorithm can clarify the probability and possible time of occurrence of various water quality indicators screened. The algorithm model can assist relevant departments to effectively use monitoring data to grasp the possible situations of wetland water quality risk factors, clarify the possible probability and possible time of occurrence of various water quality indicators screened, and use it to evaluate possible water quality risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a smooth curve graph that approximates the distribution function using the step curve of the empirical distribution function. DETAILED DESCRIPTION
[0074] 1. Create files for screening model calculations
[0075] I) Establishing screening model calculation data file
[0076] In order to more clearly express the data matrix establishment process of monitoring samples, mathematical expressions are used. The number of monitoring samples is the row, and the number of detection indicators of the samples is the column. There are n water quality monitoring samples, which is the sample capacity. Each sample also has m monitoring indicators, which is the dimension of the random variable. Taking Table 1 as an example, if a wetland has 48 monitoring samples and 12 monitoring indicators, that is, the sample capacity is 48, and the dimension of the random variable is 12, the monitoring data matrix can be represented by a 48*12 matrix;
[0077] Table 1 Monitoring sample data arrangement table
[0078]
[0079]
[0080] In terms of probability statistics, the sample size is 48, the number of monitoring indicators is 12, and Table 1 is a 48*12 matrix, whose column vector is X j ,j=1,2,…,12, obviously, X j is an observable random vector, whose mathematical expectation E(X j ) and variance D(X j )exist.
[0081] If the number of monitoring samples is n and the number of monitoring indicators is m, then X j (j=1,2,…,m)
[0082] Then the monitoring sample matrix can be expressed as an n×m matrix.
[0083] X=(X1,X2,…,X m ) T
[0084] or
[0085] X=Ax⑶
[0086] A is a constant matrix of n×m order consisting of monitoring data A=[a1,a2…,a m ], a j (j=1,2,…,m) is the column vector expressing the monitoring data, x=(x1,x2,…,x m ) T is an m-dimensional random variable.
[0087] II) In order to make the content of the matrix clearer, the monitoring data matrix is represented by the water quality index monitoring data table, and the matrix is supplemented with the following content:
[0088] A. Number the samples on the left side of the monitoring data matrix;
[0089] B. Add three rows at the top of the matrix, the first row is the name of the monitoring indicator, the second row is the number of the monitoring indicator, and the third row is the standard value of the monitoring indicator;
[0090] C. Add a column on the right side of the matrix for the monitoring date of the sample;
[0091] D. Add a row of verification items at the bottom of the matrix to verify the regulations that are greater than or less than the standard value.
[0092] The monitoring data for calculating sample detection indicators are shown in Table 3.
[0093] Table 3 Wetland water quality index monitoring data table
[0094]
[0095]
[0096] Since the water quality monitoring of recycled water wetlands is carried out throughout the year, when calculating the sample data input, the monitoring sample data and monitoring time must be accurately marked and the corresponding calculation content must be used during calculation.
[0097] III) Specific steps to fill in the calculation data file:
[0098] The data file name is named by the user. For easy searching, it is recommended to start with 0. The file determines the content of the program calculation. It is recommended to use a text file, that is, a file with a .txt extension;
[0099] The first line of the data file contains the basic information and calculation requirements of the data. Spaces or commas can be used to separate the data. The first data is the number of samples + 1; the second data is the number of monitoring indicators that the samples participate in the calculation + 1; the third data is the significance level α value of the Bartlett test; the fourth data is the probability threshold required for the probability of screening risk factors; the fifth data is the number of probability sequence calculation groups to determine the availability of parameter estimates;
[0100] The first column is the row number, which is used to facilitate the viewing of sample data numbers; the other columns are the contents specified for the monitoring samples, each sample occupies one row and is entered in the order specified for the records.
[0101] For example, create a data file by referring to Table 3, and name the file: 01.txt;
[0102] According to the input rules of the first line of the data file, the first line of the 01.txt file is entered in sequence:
[0103] 49,13,0.01,0.75,5
[0104] The first row of input data shows that: the number of data rows is 49-1=48, the number of data columns is 13-1=12, the significance level α of the Bartlett test is 0.01; 0.75 is the probability threshold of 75% specified by the screener, and 5 is the selection of 5 groups of sequences to perform sequence calculations to determine the sample size to verify whether the probability validity check is passed.
[0105] The data below the second line can be simplified: paste the standard value row of Table 1 to row 48 and the standard value column to column number 12 in the second line of the 01.txt file, and rewrite the "standard value" in the first line to the number "0". This line of data is the national standard value, which is the reference data for whether the water quality meets the standard.
[0106] The last line of the data file needs to be supplemented with a verification line of the standard value. The line number of the supplementary line is the same as the first data of the first line. The numbers of the supplementary line correspond to the data in each column. 0 means that the value is less than or equal to the standard value, and 1 means that the value is greater than the standard value. For example, the national standard in the 7th column requires that the value is greater than a certain value to meet the standard, so it is represented by 1. The rest are all national standard values that are less than a certain value to meet the standard, so they are represented by 0.
[0107] The contents of the 01.txt file are shown in Table 4
[0108] Table 4 01.txt file format
[0109]
[0110]
[0111] 2) Create a sample name file
[0112] The sample name file is a fixed file name that cannot be changed, and its name is: sample name.txt.
[0113] Paste the monitoring date column in Table 3 into the sample name.txt file and rewrite the monitoring date in the first row to the standard value, because the analysis results show the calculation results corresponding to the standard value in this position.
[0114] The content of the sample name.txt file is shown in Table 5
[0115] Table 5 Sample name.txt file format
[0116] Standard value
[0117] 2021-01-07C
[0118] 2021-01-25C
[0119] 2021-03-01C
[0120] 2021-03-16C
[0121] 2021-04-19C
[0122] 2021-05-12C
[0123] 2021-05-28C
[0124] 2021-06-17C
[0125] 2021-07-19C
[0126] 2021-08-10C
[0127] 2021-08-26C
[0128] 2021-09-10C
[0129] 2021-10-22C
[0130] 2021-11-25C
[0131] 2021-12-07C
[0132] 2021-12-23C
[0133] 2022-01-18C
[0134] 2022-02-16C
[0135] 2022-05-10C
[0136] 2022-06-02C
[0137] 2022-06-26C
[0138] 2022-07-04C
[0139] 2022-07-15C
[0140] 2022-08-02C
[0141] 2022-08-21C
[0142] 2022-09-06C
[0143] 2022-09-26C
[0144] 2022-10-24C
[0145] 2022-11-27C
[0146] 2022-12-12C
[0147] 2023-01-08C
[0148] 2023-02-02C
[0149] 2023-03-10C
[0150] 2023-03-20C
[0151] 2023-04-04C
[0152] 2023-04-18C
[0153] 2023-05-18C
[0154] 2023-06-16C
[0155] 2023-07-12C
[0156] 2023-08-11C
[0157] 2023-09-18C
[0158] 2023-10-18C
[0159] 2023-10-27C
[0160] 2023-11-14C
[0161] 2023-11-21C
[0162] 2023-11-28C
[0163] 2023-12-04C
[0164] 2023-12-20C
[0165] 3) Create a monitoring element name file
[0166] The monitoring element name file has a fixed file name that cannot be changed, and its name is: element name.txt.
[0167] Paste the first row of Table 3 into element name.txt and delete the sample number and monitoring date items. Arrange each element in columns and the calculation results correspond to the input element name.
[0168] The content of the element name.txt file is shown in Table 6
[0169] Table 6 Element name.txt file format
[0170] PH
[0171] COD
[0172] Ammonia nitrogen
[0173] CadmiumCD
[0174] Total Phosphorus
[0175] Total Nitrogen
[0176] Dissolved oxygen
[0177] Nitrite Nitrogen NO2-N
[0178] Iron
[0179] Manganese Mn
[0180] Fluoride F ˉ
[0181] Nitrate Nitrogen NO3-N
[0182] (2) Perform Bartlett's normal distribution variance homogeneity test
[0183] According to formula (14), when the sample size is n, the Bartlett variance homogeneity test is performed on the random variables expressed by the m-dimensional monitoring data.
[0184] The calculation results of this example
[0185] χ 2 =2064
[0186] α=0.01 degrees of freedom df=11χ 2 Table value = 14.63
[0187] χ 2 =2064
[0188] Do not reject homogeneity of variance
[0189] The calculation results show that they pass the Bartlett test.
[0190] (3) Parameters of the sequence calculation empirical normal distribution function
[0191] When the sample size is n, for the random variable expressed by the m-dimensional monitoring data, the sequence number q=5;
[0192] For this example, n = 44, m = 12. When n = 44, the capacity is obtained from formula (10)
[0193] i=44+0,44+1,…,44+4;
[0194] Perform sequence calculations. Perform sequence calculations on the 12-dimensional random variables, calculate the sequence q = 5, and then find the average value.
[0195] The error comparison between the average value obtained and the value obtained by i=44+q-1 is performed;
[0196] The calculation results of this example are:
[0197] Table 7 Mathematical expectation of normal distribution parameters calculated by sequence and standard deviation
[0198]
[0199] *Note: The columns in the table correspond to the indicator names in Table 2
[0200] (4) Probability calculation using sequence calculation empirical normal distribution function
[0201] Using Table 7 and standard deviation The value is used as the normal distribution parameter, the standard value is used as the origin, and the data is standardized using the following formula
[0202]
[0203] Use formula (1) to calculate probability
[0204] The calculation results of this example
[0205] Table 8 Calculation of mathematical expectation from parameter sequence and standard deviation Calculate the corresponding probability
[0206]
[0207] *Note: The columns in the table correspond to the indicator names in Table 2
[0208] The convergence index specified in Table 2 and the relative error in Table 8 are all verified. The computer displays
[0209] According to the principle of practical impossibility of low-probability events, that is, the idea that low probability has no effect on the screening conclusion, the model that meets the following conditions converges:
[0210] 1. The model convergence condition is that the relative error is less than 50% when the probability is less than 10%.
[0211] 2. The relative error of the probability greater than 10% and less than or equal to 25% is <30%
[0212] 3. The relative error of the probability greater than 25% and less than or equal to 50% is <20%
[0213] 4. For probability greater than 65%, the relative error is <5%
[0214] The probability model meets the convergence conditions!
[0215] Once the verification is passed, you can directly enter the risk factor screening.
[0216] Note: After clicking Verify Probability Screening Model Validity, steps 3 and 4 are automatically executed.
[0217] (5) The probability of using this example data to screen water quality risk factors
[0218] 1) Start the calculation Enter the "Recycled water risk factor screening" command to start the calculation program, click "Select and identify data files", follow the prompts to enter the data file 01.txt, the screening probability threshold specified in the file is 75%, substitute the probability threshold 0.75 into formula (2) to obtain the water quality risk factor threshold β of the probability threshold, and screen the data matrix X of the random variable of the monitoring indicator expressed in formula (3) according to the following formula
[0219]
[0220] Formula (16) shows that the random vector sequence {X j , j = 1, 2, ..., m} is controlled by the water quality risk factor threshold β. j For any monitoring indicator x ij (j=1,2,…,n), satisfying The monitoring indicator data is the risk factor that exceeds the probability threshold. In this example, m = 12, n = 48;
[0221] 2) Click on the probability screening of risk factors
[0222] Click the "Risk Factor Probability Screening" command in the menu, and the screen will display the calculation results of the overall probability of the water quality risk factors that may occur. The calculation results in this example are:
[0223] ①The probability of pollution index exceeding the standard value
[0224]
[0225] ② Ranking of probability of pollution indicators exceeding standard values
[0226]
[0227] The above calculation results have given the indicators of pollution exceeding the probability threshold as shown in Table 9
[0228] Table 9 Indicators of pollution exceeding probability threshold
[0229]
[0230] ③ Screening for dates and monitoring indicators that exceed the probability threshold of specific water quality risk factor threshold β
[0231] Substitute the probability threshold 0.75 into formula (2) to obtain the probability threshold β of the water quality risk factor. Substitute the probability threshold β of the water quality risk factor into formula (16) to obtain the random variable index corresponding to the water quality risk factor threshold β, that is, satisfy the corresponding condition x in formula (16). ij >β The monitoring indicator data is the risk factor that exceeds the probability threshold. ij Substitute into formula (15) for standardization, and then substitute into formula (1). Combined with Table 5, the water quality risk factors exceeding the probability threshold, their possible probability of occurrence and the corresponding date can be screened out. The results are shown in Table 10.
[0232] Table 10 Risk probability and date of possible contamination of sample elements
[0233]
[0234]
[0235]
[0236] Table 11 Risk probability and date of sample element pollution index greater than probability threshold
[0237]
[0238]
[0239] Table 12 Probability screening results of water quality risk factors
[0240]
[0241]
[0242]
[0243] The present invention including the construction of the algorithm is further discussed below.
[0244] 1. Computer Algorithms for Establishing the Direct and Inverse Functions of the Standard Normal Distribution Function
[0245] The present invention uses statistical analysis of the parameter sequence calculation of the normal distribution function, and uses the relative error of the average parameter probability compared with the direct calculation probability to determine the effectiveness of the algorithm. The calculation process can be performed by looking up a table, but the efficiency is low, so an algorithm for the normal distribution function must be established. Since the probability of the occurrence of risk factors in the next stage must be inferred based on monitoring data, an algorithm for the inverse function of the normal distribution must also be established.
[0246] Standard normal distribution function algorithm:
[0247] Using Pade approximation, we construct the confluent hyperratio function, and use the continued fraction recursive format method to establish the algorithm for the normal distribution function Φ(x), and we get
[0248]
[0249] Where h is a natural number. If h=16, the accuracy of formula (2) can reach more than 6 decimal places, which is sufficient accuracy.
[0250] Inverse function algorithm of standard normal distribution function:
[0251] When screening risk factors, the risk factor threshold β = Φ is required -1 (x), the inventors used the non-iterative algorithm proposed by Zheng Duo, that is, directly solving Φ using the following formula: -1 (x).
[0252] Let Φ(β)=Φ0
[0253] Constructor g(x) = Φ(x) - Φ0
[0254] Obviously, g(β)=0
[0255] remember structure
[0256]
[0257] This algorithm does not require iteration and directly obtains β=Φ -1 (x), the calculation accuracy can reach 6 decimal places, which is sufficient precision.
[0258] 2. Establish monitoring sample data file
[0259] The monitoring data can be represented by a matrix, with the number of monitoring samples as rows and the number of sample detection indicators as columns. In order to more clearly express the data matrix establishment process of monitoring samples, mathematical expressions are used. There are n water quality monitoring samples, which is called sample capacity, and each sample has m monitoring indicators, which is the dimension of the random variable.
[0260] Its column vector is X j ,j=1,2,…,12, obviously, X j is an observable random vector, whose mathematical expectation E(X j ) and variance D(X j )exist.
[0261] If the number of monitoring samples is n and the number of monitoring indicators is m, then X j (j=1,2,…,m)
[0262] Then the monitoring sample matrix can be expressed as an n×m matrix.
[0263] X=(X1,X2,…,X m ) T
[0264] or
[0265] X=Ax⑶
[0266] A is a constant matrix of n×m order consisting of monitoring data A=[a1,a2…,a m ], a j (j=1,2,…,m) is the column vector expressing the monitoring data, x=(x1,x2,…,x m ) T is an m-dimensional random variable.
[0267] 3. Determine the sample size of the empirical distribution function approximating the distribution function
[0268] If the monitoring data are independent of each other, they are considered as one-dimensional random variables. If there is correlation in the n-dimensional normal distribution, an orthogonal matrix is established to obtain the eigenvector U, and the overall distribution is decomposed into n independent normal distributions. Thus, the m random variables of the monitoring indicators are considered as independent random variables.
[0269] For the sake of simplicity, the m random variables of the monitoring indicators are considered to be independent random variables.
[0270] According to the law of large numbers, if the random variable sequence of water quality monitoring data of reclaimed water wetlands {X j ,j=1,2,…} are independent and normally distributed. Obviously, its mathematical expectation E(X j ) exists, variance 0 <D(X j )<+∞, construct the empirical normal distribution function from the sample Its second moment =1,2,… exists, then for any real number ε>0, when n→∞,
[0271]
[0272] This is called mean square convergence. Formula (4) indicates that as the sample size increases, the second-order moment of the sample converges to the second-order moment of the population, that is, the possibility of a difference between the second-order moment of the sample and the second-order moment of the population will become smaller and smaller. According to the theorem of probability theory, the mathematical expectation of its first-order moment is also convergent.
[0273] According to Glivenko's theorem, the population distribution function of X is F(x), and the empirical distribution function is F n (x), for any real number x, when n→+∞, we have
[0274]
[0275] Grevenko's theorem shows that when the sample size n is large enough, the empirical distribution function F n (x) converges to F(x) with probability 1 about x, which is the theoretical basis for using samples to infer the population. Formula (5) shows that when n is large enough, for all x values, the empirical distribution function F n (x) is very close to the overall distribution function F(x), such as Figure 1 That is to say, for a random variable, construct an empirical normal distribution function. When the sample size n is large enough, it can be considered that the empirical normal distribution function F n (x) converges to the normal distribution function F(x), such as Figure 1 At this time, it can be considered that when the sample size is greater than a certain value n, in the interval where the sample size is greater than n, its empirical distribution function F n (x) is very close to the distribution function F(x), and the parameters of its distribution function are also very close. According to the uniqueness theorem of characteristic function, the normal empirical characteristic function is constructed and the normal distribution characteristic function The first and second order moments of should also be very close.
[0276] Figure 1 The relationship between the population distribution function and the population empirical distribution function is intuitively depicted. Corresponding to equation (5), when n is large enough, for all x values, the empirical distribution function F n The probability that (x) is very close to the overall distribution function F(x) is 1, that is, F n The probability of an event occurring when the absolute value of the difference between (x) and F(x) is small enough is equal to 1, which means it is bound to occur. At this time, it can be considered that when the sample size is greater than a certain value n, its empirical distribution function F n (x) is very close to the distribution function F(x).
[0277] According to the theorem related to the characteristics of the characteristic function of the normal distribution function, when n is sufficiently large, if the empirical characteristic function of q sequences greater than n is The first and second moments of converge to the normal distribution function The first and second moments of, or the parameters that converge to the normal distribution function, then the empirical distribution function of the sequence F n+i (x) uniformly converges to the normal distribution function F(x). This is the theoretical basis for using the empirical distribution function to approximate the distribution function parameters. Therefore, it is concluded that the empirical distribution function F n The method for determining n when (x) approximates the normal distribution function F(x) is as follows:
[0278] 1. Determine the sample size of the characteristic function parameters of the empirical normal distribution function using the moment method
[0279] Since the sub-vectors of the random vector matrix established by the water quality observation data of the reclaimed water wetland are independent of each other, they all obey the law of large numbers and satisfy the central limit theorem. The moment method estimates the equation and uses the sample moment to estimate the overall moment. For a single sample
[0280]
[0281] Where k is the sample order and n is the sample size.
[0282] The moment method is used to estimate the normal distribution parameters. The population is normally distributed, and the moment method equation is established based on the k-th moment of the random variable.
[0283]
[0284] The population is normally distributed, and its characteristic function is
[0285]
[0286] Solve for the 2 parameters of the normal distribution. Second-order differentiable. According to the characteristics of the characteristic function (8),
[0287]
[0288] Using formula (10) to construct the moment method equation
[0289]
[0290] This yields two parameter estimates for the normal distribution.
[0291]
[0292] because Revised Estimates is 2 The minimum mean square error estimator and the optimal unbiased estimator are usually used in practical applications. As σ 2 The estimated amount.
[0293] In order to unify the dimensions of the calculation,
[0294]
[0295] The present invention uses formula (10) to calculate the parameters of the empirical normal distribution.
[0296] According to the characteristics of the characteristic function of the normal distribution function, when n is sufficiently large, if the empirical characteristic function of q sequences greater than n is The first and second moments of converge to the normal distribution function The first and second order moments of the sequence, then the empirical distribution function F n+i (x) uniformly converges to the normal distribution function F(x). Therefore, we can conclude that the empirical distribution function F n (x) approximates the normal distribution function F(x).
[0297] 2. Determination of the convergence of the empirical distribution function approximation distribution function
[0298] From formula (10) is the optimal unbiased, consistent, effective, minimum mean square error estimator, so we use As σ 2 The estimator of the sample capacity is used to calculate the sample capacity value. Taking n as the sample capacity and q as the number of sequence calculation groups, the mean estimator is In order to make the error estimation results comparable, the dimensions should be the same, so we verify σ 2 The error is estimated using the standard deviation The distribution function of the nth group is F n (x) starts with Construct a sequential empirical distribution function for parameters (i = n, n+1, n+2, ..., n+q-1) The absolute value of the relative error between the average value of the sequence calculation results and the calculation result when i=n+q-1 is taken as the convergence condition.
[0299]
[0300] Based on the principle of practical impossibility of low-probability events and the idea that low probability has no effect on the screening conclusion, it is considered that the model converges if the relative error w satisfies the sequence calculation of the conditions specified in Table 2.
[0301] Table 2 Convergence conditions calculated according to probability sequence
[0302] Serial number Convergence conditions calculated according to probability sequence (relative error between the mean value of sequence calculation and the last term) 1 For probability values less than 10%, w<50% is taken 2 If the probability value is greater than 10% and less than or equal to 25%, take w<30% 3 If the probability value is greater than 25% and less than or equal to 50%, take w<20% 4 For probability values greater than 65%, w<5%
[0303] This convergence condition is essentially: the empirical distribution function parameter estimate of the i=n+q-1th screening index of the water quality sample and The standardized distribution function F is obtained i The probability value of (x), that is, the approximate probability, is the average value of the empirical distribution function of q samples with a capacity greater than or equal to n. The absolute value of the relative error w between them satisfies formula (11).
[0304] After the conditions are met, it is considered that formula (5) is established, that is, the sample size fully meets the conditions of the screening model, because the mean and variance of the water quality monitoring data can be directly obtained. Note that exists and is greater than 0, will increase as n increases. If the following equation holds,
[0305]
[0306] Then it satisfies the Lindburg condition of the central limit theorem and also satisfies the Lyapunov theorem condition.
[0307] lim n→+∞ P(Y n ≤y)=Φ(y) (13)
[0308] That is, when n is large enough, Y n Converges to the normal distribution according to probability. Equations (12) and (13) express The probability converges to 0 consistently, expressing the sum Y n The items in the equation are uniformly small according to the probability change, and the limiting distribution of the sum of these uniformly small random variables is the normal distribution. These theories constitute the necessary conditions for the probability screening model. Taking the monitoring sample as a random variable, when the capacity is large enough, the Lindberg condition (12) is satisfied. According to the Lyapunov theorem in (13), Φ(x) can be calculated using (1).
[0309] Through a large number of calculations, the inventors believe that as long as the convergence conditions specified in Table 2 above are met, the sequence calculation with q=5 can satisfy equations (5) and (12) and (13), that is, the sample capacity of the distribution function parameters that meet the probability screening calculation can be used to calculate the probability.
[0310] 3. Methods for multidimensional normal distribution
[0311] The probability screening algorithm is based on the law of large numbers and the central limit theorem, which requires that random variables obey the normal distribution. The water quality observation samples of the reclaimed water wetland are a set of data composed of multiple monitoring indicators, or in other words, the water quality observation samples are a set of random variables composed of random vectors, and the distribution is a multivariate function.
[0312] As is well known, the relevant multivariate distribution function analysis is relatively complicated, and the difficulty of calculation and solution is relatively large, so the practical application is limited. If it can be proved that the normal distribution is independent of each other, it does not affect the overall sample to obey the normal distribution, then the difficulty of calculation and solution will be greatly reduced, and the problem will be greatly simplified. Therefore, if it is proved that the random vector component is independent and normal and does not affect the overall normal distribution, it is proved that the random variation law of the water quality monitoring data component of the present invention obeys the law of large numbers and the central limit theorem, and the law and theorem can be used for probability analysis. Because only when the multiple monitoring indicators of the water quality monitoring sample can be considered according to the one-dimensional normal distribution respectively, it can be convenient to realize the screening calculation of water quality risk factors using one-dimensional probability statistics theory.
[0313] The multidimensional subvector sequence {X j , i=1,2,…} are all independent and have the same normal distribution. Their mathematical expectation E(X j ) exists and has variance 0 <D(X j )<+∞, according to the Lindburg-Levy theorem, the multidimensional subvector sequence {X j ,j=1,2,…} obeys the central limit theorem.
[0314] The present invention applies the uniqueness relation of characteristic functions, that is, the necessary and sufficient condition for the identity of two distribution functions F1(x) and F2(x) is their characteristic functions and The identity theorem proves that the m-dimensional random vector X=(X1,X2,…,X m ) T It is composed of monitoring indicators of observed samples, each monitoring indicator X j , j = 1, 2, ... m are mutually independent normal distributions, which does not affect the sample population X obeying the normal distribution, and vice versa. Therefore, for multi-dimensional independent normal distributions, it can be decomposed into multiple one-dimensional normal distribution functions to solve.
[0315] If there is correlation in the m-dimensional normal distribution, the eigenvector U can be obtained by establishing an orthogonal matrix, and the overall distribution can be decomposed into m independent normal distributions.
[0316] If the multiple monitoring indicators of water quality monitoring samples are considered according to one-dimensional normal distribution, it is theoretically possible to use the law of large numbers and the central limit theorem to screen water quality risk factors.
[0317] 4. Bartlett's method for normal distribution variance homogeneity test
[0318] Bartlett's test is a method used to test whether the sample comes from a population with uncorrelated variables.
[0319] Because the premise of the present invention is that the monitoring data obeys the normal distribution, it is generally necessary to first perform a normality test and a variance homogeneity test on the data before performing variance analysis. In particular, this problem should be paid attention to when the sample variances differ greatly.
[0320] The present invention adopts the Bartlett test of variance comparison to perform homogeneity test of multiple normal populations (also applicable to two normal populations), and only the data that pass the homogeneity test can be used for probability analysis.
[0321] In this section, n is used to represent the capacity of the monitoring sample, and m is used to represent the dimension of the random variable or the total number. The specific method is as follows:
[0322] Suppose that m samples are randomly selected independently from m normal populations, and the size of each sample is n. i , the sample variance is The hypothesis test is
[0323] The variances of the populations are not all equal.
[0324] Under the condition that H0 is true, the Bartlett test statistic is
[0325]
[0326] in, Pooled Variance
[0327] Given a confidence level of 1-α
[0328] If equation (14) satisfies, then
[0329] Then H0 is not rejected;
[0330] like Then reject H0 and accept H1.
[0331] If the conclusion is "do not reject the requirement of homogeneity of variance", the test passes.
[0332] If the homogeneity test fails, it means that a certain detection indicator may have a singular value. The homogeneity test can be passed by adjusting the sample data.
[0333] After starting the calculation program, click "Bartlett's test" in the menu. If the calculation result shows "Does not reject the homogeneity of variance" on the screen, it means that the data passes the Bartlett's test calculation.
[0334] 5. Verifying the effectiveness of the probability screening model
[0335] Verification is performed on a certain set of monitoring data. If the probability screening algorithm passes the verification, it means that the algorithm is effective for this set of monitoring data.
Claims
1. A method for probabilistic screening of water quality risk factors in reclaimed water wetlands, characterized in that: The following steps are involved: (1) Establish the file for screening model calculation 1) Establish screening model calculation data file 1) With the number of monitoring samples as rows and the number of detection indicators of the samples as columns, the monitoring sample data is represented by a matrix. There are n water quality monitoring samples, which is called sample capacity, and each sample has m monitoring indicators, which is the dimension of the random variable; II) Supplement the monitoring sample matrix; III) Fill in the calculation data file; 2) Sample name file Paste the date column in the monitoring sample data arrangement table and rewrite the date in the first row as the standard value; 3) Monitoring element name file; Arrange the monitoring indicator names in columns; (2) Perform Bartlett's normal distribution variance homogeneity test (3) Parameters of the sequence calculation empirical normal distribution function (4) Probability calculation using a sequence of empirical normal distribution functions 1) The model convergence condition is that the relative error is less than 50% with a probability less than 10%; 2) For probability greater than 10% and less than or equal to 25%, the relative error is <30%; 3) For probability greater than 25% and less than or equal to 50%, the relative error is <20%; 4) For probability greater than 65%, the relative error is <5%; (5) Probability of screening water quality risk factors ①The probability that the pollution index exceeds the standard value; Select the sample probabilities and corresponding monitoring elements of each group of sequences in the fifth group; ② Ranking of the probability of pollution indicators exceeding the standard value; ③ Screening date and monitoring indicators of water quality risk factor threshold β that exceeds the probability threshold; Combined with the sample name file, water quality risk factors that exceed the probability threshold, their probability of occurrence and corresponding dates can be screened out.
2. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: In the step (1) of establishing a screening model calculation file, 1) establishing a screening model calculation data file, the monitoring sample matrix is represented as an n×m-order matrix: X=(X1,X2,...X j ,…X m ) T X j is a column vector, j = 1, 2, ..., m, or X=A x (3) A is a constant matrix of n×m order consisting of monitoring data A=[a1,a2…,a m ], a j (j=1,2,…,m) is the column vector expressing the monitoring data, x=(x1,x2,…,x m ) T is an m-dimensional random variable.
3. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: In the step (1) establishing a screening model calculation file, 1) establishing a screening model calculation data file, and 2) supplementing the monitoring sample matrix with the following content: A. Number the samples on the left side of the monitoring data matrix; B. Add three rows at the top of the matrix, the first row is the name of the monitoring indicator, the second row is the number of the monitoring indicator, and the third row is the standard value of the monitoring indicator; C. Add a column on the right side of the matrix for the monitoring date of the sample; D. Add a row at the bottom of the matrix to determine the regulations for values greater than or less than the standard value.
4. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: The step (1) establishes a screening model calculation file in which 1) a screening model calculation data file is established, and III) fills in the calculation data file: The first line of the data file contains the basic information and calculation requirements of the data, with spaces between the data. The first data is the number of samples + 1; the second data is the number of monitoring indicators that the samples participate in the calculation of + 1; the third data is the significance level a value of the Bartlett test; the fourth data is the probability threshold for the probability requirement of the specified screening risk factor; the fifth data is the number of probability sequence calculation groups to determine the availability of parameter estimates.
5. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: The step (2) of performing a Bartlett normal distribution variance homogeneity test comprises: Suppose that m samples are randomly selected independently from m normal populations, and the size of each sample is n. i , the sample variance is The hypothesis test is then: The variances of the populations are not all equal. Under the condition that H0 is established, the Bartlett test statistic is: in, It is called the pooled variance; Given a confidence level of 1-α If formula (2) is satisfied, then: Then H0 is not rejected; like Then reject H0 and accept H1; If the conclusion is "do not reject the homogeneity of variance", the test passes.
6. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: The step (3) sequentially calculates the parameters of the empirical normal distribution function: When the sample size is n, for the random variable expressed by the m-dimensional monitoring data, the sequence number q = 5, the mathematical expectation of the normal distribution parameter is calculated by the formula (3) and standard deviation Then the average value is calculated, and the error is compared with the value obtained by i=n+(q-1).
7. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: The step (4) of using a sequence of empirical normal distribution functions to perform probability calculation comprises: Using mathematical expectation and standard deviation The value is taken as the normal distribution parameter, the standard value is taken as the origin, and the data is standardized using the following formula: Use the normal distribution function Φ(x) for probability calculation: Where h is a natural number.
8. The method for probabilistic screening of water quality risk factors of reclaimed water wetlands according to claim 1, characterized in that: In the step (5) of screening the probability of water quality risk factors, ③ the date and monitoring indicators of the water quality risk factor threshold β exceeding the probability threshold are screened: When screening water quality risk factors, the risk factor threshold β = Φ is required -1 (x), we can directly solve Φ using equation (2) -1 (x), the method is as follows: Let Φ(β)=Φ0 Constructor g(x) = Φ(x) - Φ0 Obviously, g(β)=0 remember structure Using formula (2) we can directly obtain β = Φ -1 (x); Substitute the required probability threshold into formula (2) to obtain the water quality risk factor threshold β of the probability threshold. Substitute the water quality risk factor threshold β into formula (16) to obtain the random variable index corresponding to the water quality risk factor threshold β, That is, the corresponding condition (16) is satisfied. The monitoring indicator data is the risk factor that exceeds the probability threshold. ij Substitute into equation (15) for normalization, and then substitute into equation (1).
Citation Information
Patent Citations
Accelerated degradation data validity testing and model selection method
CN105468907A
Methodology for robust portfolio evaluation and optimization taking account of estimation errors
US20070288397A1