Moment-based density estimation of confidential micro-data: a computational statistics approach

Providing access to synthetic micro-data in place of confidential data to protect the privacy of participants is common practice. For the synthetic data to be useful for analysis, it is necessary that the density function of the synthetic data closely approximate the confidential data. Hence, accurately estimating the density function based on sample micro-data is important. Existing kernel-based, copula-based, and machine learning methods of joint density estimation may not be viable. Applying the multivariate moments’ problem to sample-based density estimation has long been considered impractical due to the computational complexity and intractability of optimal parameter selection of the density estimate when the true joint density function is unknown. This paper introduces a generalised form of the sample moment-based density estimate, which can be used to estimate joint density functions when only the information of empirical moments is available. We demonstrate optimal parametrisation of the moment-based density estimate based solely on sample data by employing a computational strategy for parameter selection. We compare the performance of the moment-based estimate to that of existing non-parametric and parametric density estimation methods. The results show that using empirical moments can provide a reasonable, robust non-parametric approximation of a joint density function that is comparable to existing non-parametric methods. We provide an example of synthetic data generation from the moment-based density estimate and show that the resulting synthetic data provides a reasonable disclosure-protected alternative for public release.


Introduction
Disseminating synthetic data in place of confidential microlevel data can be an efficient way to protect the privacy of survey and clinical trial participants. Whether a set of synthetic data is ideally suitable in representing the statistical information from a confidential data source depends upon the similarity of the density function of the set of synthetic data to the density function of the confidential data source. Therefore, having a reliable and robust method for estimating the underlying density function is essential in the synthetic data generation process.
Many existing non-parametric density function estimation methods, including kernel density estimation, rely heavily on local area estimation. The low-density local areas used to construct the density function estimate of a sample space may contain very few sample observations. The values of the sample observations in those areas are more easily iden-tified or reconstructed later from the constructed density function estimate, posing greater risk to privacy and confidentiality. Data agencies can offset the risk of disclosure by defining local areas of greater size (larger bandwidth) or through perturbation, but this may adversely impact statistical utility. Therefore, those methods relying on local area estimation may not be suitable when confidential data is involved. Existing parametric maximum likelihood and mixture distribution approaches often lack sufficient robustness to estimate atypical distributions effectively. Researchers tend to opt more for kernel estimators, maximum likelihood estimators, or increasingly, non-parametric machine learning techniques (Izenman 1991;Wang and Scott 2019). While highly effective in varying contexts, these methods have limitations, especially when dealing with atypical, incomplete data. Moreover, circumstances in which the data agency may restrict access to micro-level data will result in data-driven non-parametric approaches becoming untenable.
This paper proposes a computational approach for estimating a joint density function of continuous data. The estimated density function is expressed as a finite linear summation of orthogonal polynomial functions and only relies on sample moments. Without knowledge of the joint density function underlying the continuous data, this paper develops a feasible computational strategy that searches for the appropriate maximum order of polynomials used in the estimated density function. We show that the moment-based density approach achieves a compromise between non-parametric and parametric methods, offering a non-parametric global estimate that is sufficiently robust. We also provide an example application of moment-based density estimation in producing synthetic continuous micro-data on confidential micro-data for disclosure protection.
Although our primary motivation, the application of moment-based density estimation is not limited to use cases for confidential data. Moment-based density estimation has interesting applications in imputation for missing data more broadly and for the estimation of continuous density functions from tabular data. Furthermore, there has been recent developments in applying moment-based density approximates in stochastic models for finance (Stoyanov 2016) and image reconstruction (Mustapha and Dimitrakopoulos 2010).
Constructing unique polynomial-based series expansions for continuous functions is a common practice applied in a range of areas of mathematics, physics engineering, and statistics (Munkhammar et al. 2017). Polynomial-based expansions have been used in studies to approximate probability density functions on both closed and infinite domains (Elderton and Johnson 1969;Solomon and Stephens 1978;Kendall et al. 1987;Reid 1988;Provost 2005). Known more commonly as the moments' problem, this area of study has been considered from as far back as the 19th century (Gram 1883). The advent of greater computational power has increased the usage of polynomial expansions. Currently, however, polynomial-based expansions are rare in multivariate density estimation applications, when compared to their use for univariate estimation. As noted by Kleiber and Stoyanov (2013), the results for the multivariate case tend to be scattered throughout specialised journals and focus on an analytical perspective.
This paper focuses on distributions with bounded marginal domains to ensure determinacy. Determinacy, and more specifically moment determinacy, refers to the existence of a unique moment-based expansion (Kleiber and Stoyanov 2013). This paper requires no specific choice of the associated reference joint density (weight) used. The restriction to a bounded domain is certainly not necessary if moment determinacy can be assured. All results presented in this paper can be generalised on unbounded domains in certain situations. Unbounded reference joint densities shown in the literature to have moment determinacy include the normal and gamma distributions (Provost 2005). Furthermore, as demonstrated in Lin (2014), which applies a univariate form of moment-based density estimation to recover information from perturbed data, assuming a compact domain can result in a reasonable estimate for density functions that exist on an unbounded domain provided the sample size is sufficiently large enough.
This paper is structured in six sections. Section 2 provides the analytical results required to construct the moment-based density estimate. Section 3 considers a measure of goodness of fit for the moment-based density estimate and outlines a sample-based strategy for parameter selection. In Sect. 4, we perform a simulation study to compare the performance of the moment-based density estimation method with existing joint density estimation methods. In Sect. 5, we outline a process of simulating synthetic micro-data from the moment-based density estimate and demonstrate this application to hypothetical confidential data. We conclude our paper in Sect. 6.

The multivariate moment-based density estimate
Throughout the literature, researchers have mainly focused on the usefulness and effectiveness of a particular orthogonal polynomial basis in regards to estimating certain distributions, selecting classical polynomial families as the basis for the expansion (Gram 1883;Edgeworth 1905;Charlier 1914;Szegő 1939;Cramer 1946;Alexits 1961;Kendall et al. 1987;Provost 2005). These classical polynomials are usually chosen based on the resemblance of their weight functions (derivative of the positive Borel measure by which the polynomials are orthogonal) to the canonical distributions.
Orthogonal polynomials for which a density approximation has been derived in the literature include Hermite (Edgeworth and Gram-Charlier Expansions), Legendre, Jacobi and, Laguerre Polynomials (Gram 1883;Edgeworth 1905;Charlier 1914;Szegő 1939;Cramer 1946;Alexits 1961;Kendall et al. 1987;Provost 2005). They have weight functions resembling normal, uniform, beta, and gamma distributions, respectively. These polynomials can all be used to provide moment-based expressions of certain density functions and are eigenfunctions of a hypergeometric type second-order differential equation (Sánchez-Ruiz and Dehesa 1998). Multivariate orthogonal polynomial expansions, particularly for Hermite, Jacobi, and Laguerre polynomials, have been considered in the literature (Xu 1997;Griffiths and Spano 2011). Joint density expressions for quasi-multivariate normal distributions have also been developed using a Hermite polynomial-based expansion (Mehler 1866;Withers and Nadarajah 2010). This section derives a generalised form of the multivariate density estimate and the fundamental mathematical results required to apply this density estimate in practice. This form covers many existing approaches and allows for greater flexibility in the choice of reference density and resulting orthogonal polynomials used.

The orthogonal polynomial basis
Initially, we only consider the orthonormal basis for the univariate case in a single-dimensional space = [a, b]. Later this basis is expanded to the N -dimensional compact space (N ) Let f ν denote the probability density function of a random variable ν with the domain the closed interval = [a, b]. We refer to f ν as the reference distribution function, and this function will serve as the weight function on an orthonormal basis.

Univariate polynomial basis
Regarding the function f ν , the results of Sánchez- Ruiz and Dehesa (1998) can be summarised in the following theorem.
then there exists a set of eigenfunction solutions {P n (x)} n∈N 0 , where N 0 denotes the set of all natural number including 0, of the hypergeometric-type differential equation, P n (x) denotes the nth eigenfunction solution corresponding to λ n = nψ 1 + n(n − 1)φ 2 and has the following properties: (ii) P n (x) is a polynomial of degree n with Rodrigues' formula of the form where B n ∈ R is the normalising constant in the Rodrigues' formula and can be chosen arbitrarily in order to show consistency with classical orthogonal polynomial families. (iii) Given B n of the Rodrigues' formula is defined as follows, where δ n,m denotes the Kronecker delta, and n, m ∈ N 0 . Hence {P n (x)} n∈N 0 are orthogonal polynomials.
Theorem 1 shows that provided an appropriate quadratic polynomial σ (x) and appropriate linear polynomial τ (x) for a given reference density f ν can be found; then, we can obtain the aforementioned set of polynomials. Theorem 1 makes no statement about the domain of the underlying distribution and can therefore be applied to reference distributions defined on both bounded and unbounded domains. Many of the standard probability densities used in statistics meet this criterion as a reference density. Table 1 provides examples of σ and τ functions for some of these densities and the connection of the resulting polynomials to the classical orthogonal polynomial families.
In the following, we list some properties of the orthogonal polynomials without specifying the distribution of the reference function f ν . These properties will benefit the computational approach for moment-based joint density function estimation later developed in this paper.
Property 1 Regarding the polynomial function P n (x) = n i=0 a n,i x i , the coefficient a n,i for fixed n ∈ N 0 is given by, where κ n = B n n−1 i=0 [ψ 1 + (n + i − 1)φ 2 ] and κ 0 = 1.
Property 1 provides the Frobenius solutions to the polynomial coefficients for each of our polynomial terms. We note that this solution also applies to reference densities on the unbounded domain and can be used to derive the coefficients of all the classical polynomial expressions given in Table 1. Denote Property 2 (i) The integral of polynomial P n (x) with respect to the measure function μ ν is where c ∈ R is some constant and F ν is the cumulative distribution function of f ν .
Property 2 expresses the indefinite integral of the orthogonal polynomials with respect to the reference density. This expression is essential in the practical application of the density estimate as it allows for the analytical derivations of the distribution functions associated with the multivariate density estimate. However, due to length constraints, we will not give the expressions of all the associated distribution functions in this paper. Property 2 will be used in Sect. 5, to derive the expression of the moment-based conditional distribution function estimate. One of the key benefits of the polynomial-based approach to density estimation is the analytical flexibility and applicability of the resulting density estimate. Provided the reference density is continuous and differentiable, then so too is the resulting moment-based density expression and thus is more easily applied in inversion and optimisation problems.
Therefore, polynomials {P n } n∈N 0 can serve as basis functions when expanding any continuous functions in L 2 space L 2 ( , μ ν ). Given this property, we extend the complete orthogonal basis to a multivariate space in the following section.

A multivariate polynomial basis
Consider a N -dimensional compact space given by (N ) From this point on, we will consider the orthogonal polynomial bases on (N ) Here f ν k is a probability density function of a random variable ν k with the domain the closed interval k = [a k , b k ], k = 1, . . . , N . Random variables {ν k } k=1,...,N are mutually independent. We refer to f ν as the reference joint density function and this function will serve as the multivariate weight function in our orthonormal basis.
Of interest is the L 2 space L 2 ( (N ) , μ ν ) with measure function μ ν defined by where F is the σ -field of (N ) . By taking the product of the univariate orthogonal polynomials described in Sect. 2.1.1 we obtain a set of multivariate orthogonal polynomials defined on (N ) These multivariate polynomials are given as follows.
Definition 1 Let {P k,n k } n k ∈N 0 the set of hypergeometric type polynomials given by the density function f ν k , k = 1, . . . , N . The multivariate hypergeometric type polynomial P n 1 ,...,n N (x) associated to f ν is given as the product of N hypergeometric type polynomials P k,n k of degree n k for each k = 1, . . . , N , that is where σ k and τ k refer to the polynomials described in (2) of the kth hypergeometric type polynomial and B k,n k refers to the kth normality constant described in (1) and (4).
We can subsequently leverage the construction of the multivariate polynomial as a product of marginal univariate polynomials to decompose the multivariate polynomial into its marginal components. In doing so, the completeness and orthogonality of the univariate marginal polynomials ensure the multivariate polynomials defined in Definition 1 are themselves orthogonal and complete in the N -dimensional space. As such, it can be said these multivariate polynomials form a complete orthonormal polynomial basis for the Ndimensional L 2 product space L 2 ( (N ) , μ ν ). This statement is given more formally in Theorem 2.

Theorem 2
The multivariate hypergeometric-type polynomials are orthonormal on the compact space (N ) = N k=1 k and complete in the L 2 space L 2 ( (N ) , μ ν ).
A detailed proof of Theorem 2 is given in "Appendix A".

Multivariate moment-based density function
Let X = (X 1 , . . . , X N ) be a random vector with joint density function f X on (N ) . The joint density function f X can be uniquely expanded into a polynomial expression, multiplied by the reference density f ν (x), by use of orthonormal basis functions {P n 1 ,...,n N (x)} n 1 ,...,n N ∈N 0 on the compact space (N ) . The resulting density expression has polynomial coefficients, which are functions of the underlying moments of the distribution. This form of the joint density is referred to in this paper as the multivariate moment-based density (MBD) expression.
We begin with the statement of the theorem outlining the multivariate moment-based density expression.

Theorem 3 The Multivariate Moment-Based Density.
Let X = (X 1 , . . . , X N ) be a random vector with joint density function f X on space (N ) where the coefficient terms C n 1 ,...,n N are given by C n 1 ,...,n N = E X P n 1 ,...,n N (X 1 , . . . , X N ) where a n 1 ,...,n N ;i 1 ,...,i N = N k=1 a n k ,i k and a n k ,i k is the i k th coefficient of the n k th polynomial P k,n k (x k ).
Proof of Theorem 3 can be found in "Appendix B".
The expansion given in Theorem 3 relates to a jointdensity defined on a compact space. We imposed this restriction to ensure moment determinacy, as, on unbounded spaces, we cannot guarantee moment determinacy. Polynomials given by (8) and applied in Theorem 3 may still be extended to unbounded spaces such as in the case of f ν k , for any k = 1, 2, . . . , N , being defined by a normal (Hamburger case) or gamma (Stieltjes case) density. For these cases, moment determinacy can be assured by the completeness of the Laguerre and Hermite polynomial families (Provost 2005).
In the examples of these types of polynomials in the literature, it is often assumed that all marginal densities of the joint density being approximated have a consistent kind of distribution. Here we make no such assumption, and only ensure that the domain of our multivariate polynomials is consistent with that of our joint density, provided that f X / f ν ∈ L 2 ( (N ) , μ ν ) and has finite moments i.e. E X X i 1 1 · · · X i N N < ∞, for all i 1 , . . . , i N , which enables the correct estimation of joint densities with variables of different domains, a common occurrence in real-world data.
The hypergeometric polynomial-based expansion of a joint density function generally is an infinite sum of polynomials. It is impracticable to evaluate this infinite sum to obtain the complete information of the joint density function. Using finite summation terms in the expansion to approach the density function is one way to address this issue. The function of the finite summation terms is named the finite order multivariate moment-based density, which is defined as follows.

Definition 2 The Finite Order Multivariate Moment-Based Density
The finite order multivariate moment-based density approximation of max order The Weierstrass-Stone approximation theorem provides that f X:K converges uniformly to f X as the order K increases. Using f X:K as an estimate of f X is not practicable in real-life data analysis. One issue is the evaluation of the coefficients {C n 1 ,...,n N } in f X:K . The coefficient C n 1 ,...,n N is a linear function of joint moments of X. The evaluation of coefficients requires the knowledge of the density function f X while f X is unknown. The following section introduces the finite order multivariate sample moment-based density function to address this problem.

Multivariate sample moment-based density estimation
We now consider an approximation of multivariate density functions based on sample moments.

Definition 3 Multivariate Sample Moment-Based Density Approximation
Given a random sample as an estimator of f X and name it the sample moment-based estimator of f X or the moment-based estimator of f X if there is no ambiguity.
A significant issue when estimating the multivariate joint density function is computation complexity. The use of as an estimate of f X has some computational advantages.
The marginal moment-based density estimates determined by integrating the joint moment-based density estimate are consistent with what would be achieved if the estimation were applied to the original sample's corresponding marginal subset. Computationally we note that all coefficients of the various marginal distributions are elements of the set of joint density coefficients, meaning marginal density estimates are easily computed given the joint density coefficients. An essential factor for many density estimation schemes is the ability for these schemes to be adjusted or updated based on new data. Refitting density estimates in large sample and high-dimensional scenarios can be highly time-expensive. The moment-based density estimate is somewhat resilient to this issue, as the data agency can introduce new information to the existing model by averaging a density estimate based solely on the latest data with the original density estimate.
In privacy-sensitive situations, micro-level information may not necessarily be available due to the risk of information disclosure. Like that employed in Kernel density estimation, local density estimation methods require knowledge of the frequency of observations within a particular bandwidth. Due to privacy concerns, this knowledge may be challenging to obtain in sparsely populated areas. Perturbation techniques are also increasingly being used on privacy-sensitive statistics. Perturbation greatly reduces the statistical utility of estimates, even when such information is obtainable. By only using sample moments within the density estimate expression, we can tailor our estimate based on what information is available, with sample-moment information usually being more easily accessible, especially for lower-order moments.
As a result of the large number theory,f X; ) approaches to f X;K as M increases. At the same time, the function f X;K is a reasonable approximate of f X as K → ∞.
as an estimator of f X makes sense. However, K and {X i } M i=1 might either independently or mutually impact the performance of the estimator in estimating f X . To construct a good estimatorf X;K in practice, the up order K can work as an "adjuster" while the working sample {X i } M i=1 is fixed. In the following sections, we propose and demonstrate a computational statistics approach for determining K in given M is fixed. Under the mean square distance L 2 ( (N ) , μ ν ) criterion, we expect that with the determined K,f X;K can perform well based on the available sample information from the underlying population X.

The N K -norm and max polynomial order
To quantify the quality of the resulting density estimate, we propose an averaged measure of divergence from the true joint density function, referred to as the N K -Norm, which is similar to the integrated square error statistic but allows for the decomposition of the error in terms of the estimated and coefficients given in (10).
The definition of the N K -Norm of the Approximation is given below.
is defined to be the L 2 ( (N ) , μ ν ) norm of the difference between the sample approximationf X;K x; {X i } M i=1 and the true joint density f X (x) as a ratio of the reference joint den- is a statistic. Using N K to measure the difference betweenf X;K and f X quantitatively is different from measuring the maximum point-wise difference between the two functions. A small value of N K cannot guarantee the differences betweenf X;K (x) and f X (x) are small for all x. However, it can ensure that, on average, the differences betweenf X;K (x) and f X (x) can be depicted by the value of N K . The difference is a difference of ratios. As long as f ν (x) has a non-zero bound, such a ratio difference can be reasonable to depict the difference betweenf X;K (x) and f X (x), particularly, if f ν (x) has a uniform distribution.
It is also important to note the similarity of the N K -Norm to the integrated square error statistic (ISE) of a density estimatef (x) of f (x) expressed below, The point of difference between the N K -norm and ISE(f ) is that the former is a weighted squared L 2 -norm in the L 2 ( (N ) , μ ν ) space. In contrast, the integrated square error is measured within Euclidean space. Using this weighted measure, the expected value of the statistic, which reflects the variance and bias components of the estimate, can be expressed in terms of the corresponding coefficients in (10).
The proof of Theorem 4 is simple if we note that, A crucial dichotomy arises when applying the momentbased density estimation method, which is demonstrated in the expression of the expected value of N K -Norm. Increasing the order of the approximation will lead to a reduction in the remainder term T K . However, an increase in the order of approximation also inflates the aggregated variance of the coefficient estimators.
This tradeoff between the remainder term and the estimator variance is at the heart of determining the optimal strategy for approximating the joint density function in practice, based on sample data. The tradeoff also suggests that the usual approach to polynomial approximations used in mathematics, taking the largest order feasible based on computation and accuracy requirements, is inappropriate in the sample context. Instead, it suggests that there may be an optimal max polynomial order to the approximation.
We provide the following definition of an optimal max polynomial order.

Definition 5 An Optimal Max Polynomial
Order.
An optimal max polynomial order denoted K * = (K * 1 , . . . , K * N ) is defined as a vector of max polynomial orders in the approximation such that for any possible max polynomial order K = (K 1 , . . . , K N ).
This K * will ensure that the mean of N K * {X i } M i=1 takes the smallest value. It does not mean that, for all the realisations of the random sample will provide the information of a confidence level of a reali- falling in a close neighbourhood of the smallest value.
Given just the definition, it is unclear whether we can obtain such a quantity. It appears entirely feasible that taking larger and larger max polynomial orders may improve the density estimate (based on the N K -Norm). However, in the following theorem, we show that provided the estimated coefficients applied in the approximation have a non-zero variance (after some point), then the optimal max polynomial order is finite, i.e., for K In practice, the estimated coefficients applied in the approximation will have a non-zero variance as the estimated coefficients are linear combinations of higher and higher order sample moments.

Theorem 5 Suppose there exists
, has a finite optimal max polynomial order.
The proof of Theorem 5 can be found in "Appendix C". In a practical situation, we may not necessarily know the true joint density of a sample, and hence it would be untenable to calculate the N K -Norm statistic. But this value does not explicitly need to be known to determine the optimal max polynomial order. Consider the following definition of the shifted N K -Norm.
The relationship between N * is summarised as follows: ) will also take the smallest value at K * , vice versa. (13) can be more easily estimated in a computational approach, i.e. for any random function g(X), , the optimal max polynomial order K * can be identified through min We propose the following strategy for estimating the mean of the shifted N K -Norm given a random sample . This strategy is valid subject to a condition that the probability distribution of any subsample, which was randomly drawn from the random sample . This condition is not too strict in general as long as the size of the subsample is not too small.

Randomly partition observations of the random sample
into two approximately equal-size partitions {X i } i∈I and {X i } i∈I . 2. Calculate the statistic: where ||I|| denotes the sample size of {X i } i∈I . 3. Repeat 1 and 2 B times to obtain the set of repeated shifted N K -Norm statistics The variance of the shifted N K -Norm statistics can be estimated through the sample variance.
With the information of the mean of the shifted N K -Norm, we can determine an appropriate upper polynomial order K = (K 1 , . . . , K N ) for moment-based density function estimation. Sometimes, searching for the proper upper polynomial order K is a complex process, especially when N > 3. To reduce the complexity we may restrict the search process only to those K with K 1 = · · · = K N in practice. However, restricting the search process to those K with K 1 = · · · = K N may not be appropriate when there are considerable differences of scale and distribution between marginal variables of the data. We use such a restricted search process in the comparison study undertaken in the next section as both marginal variables are marginally beta distributed on [0, 1]. In Sect. 5, we do not apply a restricted search process as there are large differences in distribution and scale across the marginal variables of the data.

Comparing density estimation methods
In the following section, we compare the performance of the moment-based density estimate and a range of other multivariate density estimation methods through a bivariate example below.
The other moment-based density estimate (bMBD) applies a beta reference density for both marginal distributions where the parameters of the beta distribution are taken to be the method of moments estimates of the sample data for each marginal. We note that the bivariate Gaussian kernel density estimate (Duong 2007) is a non-parametric local estimation method and is calculated using the ks package in R and associated kde function with optimal bandwidth selector (see Duong 2018). The bivariate Gaussian copula with a marginal beta distribution (Hofert et al. 2020;Yan 2007;Kojadinovic and Yan 2010;Hofert and Mächler 2011) is a parametric global density estimate and is calculated using the copula package in R (see Hofert et al. 2020) with the marginal beta distribution parameters taken to be the corresponding method of moments. The density estimation trees estimate (Meyer 2017) is a machine learning estimate and is calculated using the detpack package in R with element refinement goodness of fit significance taken to be 1 × 10 −5 (see Meyer 2019).
For all density estimates, the integrated square error (12) with respect to the true bivariate beta density function (15) is determined by Monte Carlo integration using a uniform sample of size 100,000 on [0, 1] × [0, 1]. The ISE statistic is averaged across all 100 simulations to give the mean integrated square error (MISE). In the case of the uMBD moment-based density estimate, the ISE statistic corresponds precisely to the N K -Norm statistic (see Definition 4), and hence the MISE is an estimate of the expected N K -Norm expressed in Theorem 4. In the case of the bMBD momentbased density estimate, the mean N K -Norm across the 100 simulations is also determined using Monte Carlo integration with a uniform sample of size 100,000 on [0, 1] × [0, 1].
The max polynomial order applied in the expression of the moment-based density estimates, K = (K 1 , K 2 ), is set to be consistent across both marginal distributions, i.e. K = K 1 = K 2 . We determine the optimal max polynomial order (see Definition 5) by selecting the max polynomial order which minimises the mean N K -Norm. For uMBD this is consistent with minimising the MISE. For each comparison density estimate, we also determine the percentage of simulations in which the uMBD and bMBD achieve a smaller MISE value when the optimal max polynomial order is used.
The remainder term component of the mean N K -Norm, i.e. the τ K term given in Theorem 4, is also estimated by evaluating the N K -Norm when theoretical moments are used to express the moment-based density estimate. This term reflects the bias component of error in the moment-based density estimate.
We provide the simulation study results for all four scenarios in Table 2.
The simulation study shows that both the uMBD and bMBD estimates outperform the Gaussian kernel density estimate nearly universally for all scenarios in which at least one α i < 1 (i = 1, 2). However, the Gaussian kernel density estimate universally outperforms both the uMBD and bMBD estimate when α 1 = 1.6 and α 2 = 1.8. When α 1 = 1.6 and α 2 = 1.8, the true density f X 1 ,X 2 (x 1 , x 2 ) achieves its maximum on the boundary condition x 1 + x 2 ≤ 1. This boundary condition is not specifically enforced by construction for any of the density estimates. Although due to the local estimation applied by the Gaussian kernel density estimate, zero areas of the sample space can be better predicted. The polynomial curves applied in the uMBD and bMBD approaches require a high max polynomial order to model the immediate change in density values to zero adequately. This issue is not as significant in previous parameterisations as density function values near the x 1 + x 2 ≤ 1 boundary are small. As a higher max polynomial order would also constitute greater sampling variance, the optimal max polynomial order remains relatively low, reducing the quality of the moment-based density estimates relative to the Gaussian kernel density estimate for the α 1 = 1.6 and α 2 = 1.8 parameterisation. The Gaussian copula with marginal beta distribution performs best comparatively in scenarios where α 1 = 0.6, outperforming the uMBD estimate in approximately 86-88% of samples. The copula estimate does not appear to perform as well as the bMBD estimate in general for any scenario, only achieving a smaller MISE in at most 1% of simulations in each scenario. The density estimation trees estimate similarly does not perform as well as the bMBD estimate across all scenarios. The uMBD estimate also outperforms the density estimation trees estimate in most simulations in all scenarios.

Generating synthetic micro-data example
In the following section, we provide an example of synthetic micro-data generated from a "confidential" data set. Before this example, we outline the process of simulating synthetic data from the moment-based density estimate.

Simulating synthetic data from the density estimate
of (Y , X) = (Y , X 1 , X 2 , . . . , X N ), and corresponding moment-based density estimatef Y ,X;K ((y, x); , we define the moment-based conditional cumulative probability function estimate of Y given X as follows, Given Property (2) in Sect. 2.1.1, we derive the following expression for the moment-based conditional cumulative probability function estimate of Y given X,F Y |X;K (y|x; where f ν Y and f ν X are the reference densities of Y and X respectively,Ĉ n Y ,n X ,1 ,...,n X ,N , are the estimated coefficients of the moment-based density estimatef Y ,X;K ((y, denotes the reference cumulative distribution function of Y , and δ n Y ,0 denotes the Kronecker delta. We make note of the following in regards toF Y |X;K (y|x; 1. We have an analytical expression of the moment-based conditional cumulative probability function estimate of Y given X, which does not require numerical integration. 2. The moment-based conditional cumulative probability function estimate of Y given X is a univariate cumulative distribution function (in terms of Y ) from which we can simulate an observation Y * using inverse transform sampling. That is, given X * 1 , . . . , In the following section, we obtain a 5-dimensional momentbased density estimate and simulate data from a "sensitive" variable of the data (a variable that poses a risk to confidentiality if disclosed) by applying inverse transform sampling to the moment-based conditional cumulative probability function estimate.

Synthetic data example
The data we consider {(Y i , X i )} 9568 i=1 are 9568 observations of 5 variables collected from a combined cycle power plant over six years (2006)(2007)(2008)(2009)(2010)(2011) when the power plant was set to work with full load (Tüfekci 2014;Kaya and Tufekci 2012). The dataset consists of hourly average ambient variables (X = (X 1 , X 2 , X 3 , X 4 )): temperature (X 1 ), ambient pressure (X 2 ), relative humidity (X 3 ), and exhaust vacuum (X 4 ), that were collected to predict the net hourly electrical energy output of the plant (Y ).
Suppose that the values of the plant's net hourly electrical energy output are considered "sensitive" due to a risk of proprietary infringement or operational sabotage were the actual data released. We produce synthetic data that mimics the true values of the net hourly electrical energy output by obtaining a moment-based density estimatef Y ,X;K of the joint distribution of the data. For each variable, we select uniform reference densities with bounds consistent with its range plus or minus (for the maximum and minimum, respectively) a buffer of 5% of its standard deviation.
Averaged across B = 100 randomly sampled partitions, we achieve the estimates of the shifted N K -Norm for various max polynomial orders from 1 to 35 for each variable. The estimated optimal max polynomial order is determined to beK * = (21,22,12,5,22).
We simulate a synthetic sample of net hourly electrical energy outputs ({Y * i } 9658 i=1 ) using inverse-transform sampling on the moment-based conditional cumulative probability (21,22,12,5,22). We note that given uniform reference densities are used, is a polynomial with respect to y. We apply the base R polynomial rooting function polyroot() (Jenkins and Traub 1972) to compute values from the inverse moment-based conditional cumulative probability function estimate.
Histograms comparing the distribution of the actual net hourly electrical energy output ({Y i } 9658 i=1 ) and synthetic net hourly electrical energy output ({Y * i } 9658 i=1 ) are given in Fig. 1. Scatterplots showing the associations of both the actual and synthetic net hourly electrical energy outputs with each net hourly ambient variable are given in Fig. 2. Heatmaps showing the bivariate marginal density of both the actual and synthetic net hourly electrical energy outputs with each net hourly ambient variable are given in Fig. 3.
The histograms in Fig. 1 indicate that the synthetic net hourly electrical energy outputs approximate the shape of the actual net hourly electrical energy outputs well. However, synthetic net hourly electrical energy outputs appear slightly over-populated in the distribution's tails compared to the actual net hourly electrical energy outputs, leading to a slightly "flatter" distribution overall. This over-population of synthetic net hourly electrical energy outputs in sparsely populated areas of the actual data is also apparent when comparing the bivariate associations of the net hourly electrical energy outputs with each net hourly ambient variable shown in Figs. 2 and 3 . The general pattern of association between the net hourly electrical energy outputs and each net hourly ambient variable is approximated by the synthetic data well. However, sparse areas of the actual data appear over-estimated by the moment-based density estimate.
To assess the statistical utility of the synthetic data for prediction modelling, we compare statistics obtained by a main-effects ordinary least squares regression of the net hourly ambient variables on the actual and synthetic net hourly electrical energy outputs. The results of the linear regression analysis are given in Table 3. The estimated coefficient of the ambient temperature data (−1.727, 95% CI [−1.785, −1.669]) and the relative humidity data (−0.128, 95% CI [−0.143, −0.112]) obtained from the synthetic data underestimated the magnitude of the corresponding estimated coefficient obtained from the actual data (−1.978 and −0.158 respectively). Whereas the estimated coefficients of exhaust volume (−0.259, 95% CI [−0.287, −0.231]) and ambient pressure (0.093, 95% CI [0.057, 0.128]) obtained from the synthetic data better represent the estimated coefficients obtained from the actual data, with both actual coefficient estimates (−0.234 and 0.062 respectively) belonging to the 95% confidence intervals of the corresponding coefficient estimates obtained from the synthetic data. All coefficient estimates obtained from the synthetic data have increased standard error estimates. The synthetic-based linear regression model has an increased residual mean square error estimate (8.804) compared to the actual-based linear regression model (4.558). A reduction in the proportion of variation explained by the model (R 2 ) is also seen in the syntheticbased model, with R 2 = 0.748 from the synthetic-based model being less than R 2 = 0.929 from the actual-based model.
Although the performance of the synthetic data appears mixed, unlike other model-based synthetic generation methods, synthetic data obtained from the moment-based density estimate is not model specific and can be used to fit any model. For instance, suppose we were to fit a full factorial linear regression model of the net hourly ambient variables on the actual and synthetic net hourly electrical energy outputs. Without re-defining our generation model or re-sampling, we obtain the results given in Table 4 for the same synthetic data used to obtain the results in Table 3. Again, all coefficient estimates obtained from the synthetic data had increased standard error estimates. Although in all cases, the estimated coefficients obtained from the actual data for the full factorial model are contained within the 95% confidence interval of the corresponding estimated coefficients obtained from the synthetic data.
Considering the disclosure risk posed by the synthetic net hourly electrical energy outputs, we note that only approximately 3% of observations in the actual data have synthetic observations within a 1% standard-deviation-based interval (Mateo-Sanz et al. 2004) of their values. Figure 2 shows that regions containing multivariate outliers in the actual data are well populated in the synthetic data. A data intruder, therefore, would find it difficult to determine which synthetic observations (if any) could be successfully attributed to an actual observation and which should be treated as erroneous based on the synthetic data alone. Given a public release of the synthetic data, we suggest that the disclosure-prone multivariate outliers present in the actual data are more greatly shielded from attribution due to the high presence of synthetic observations in and around corresponding regions of the synthetic data.

Conclusion
Our specific interest in this paper is the application of moment-based density estimation in the context of sharing confidential micro-data while preserving the privacy of the respondents. The multivariate moments' problem and its application to estimating joint density functions are often considered highly impractical in modern-day analysis. Methods that do exist in this context, often fail to account for the sampling problems faced in real-world applications due to the computational complexity and intractability of higherorder moments. One of the critical difficulties in obtaining moment-based density expressions is the breadth of variation seen in densities requiring estimation. The support of these distributions must align with the orthogonal basis used in the density approximation (Kleiber and Stoyanov 2013). By requiring consistency in sample space, we inherently arrive at three different cases: Hausdorff (density functions defined on a compact space), Stieltjes (density functions defined on a half bounded (lower or upper) space) (Stieltjes 1894;Stoyanov and Tolmatz 2005) and Hamburger (density functions defined on a completely unbounded space) (Shohat and Tamarkin 1943;Akhiezer and Kemmer 1965). We have focused mainly on the Hausdorff problem, joint-densities on a compact space, and have only referred to our ability to apply such methods on the unbounded space provided moment determinacy.
Determinacy refers to the existence of a unique momentbased expansion of the density function. Kleiber and Stoyanov (2013) extensively review this concept in the context of   the multivariate moments problem. Interestingly, the paper investigates the relationship between the marginal determinacy and the determinacy of the multivariate distribution as a whole. It raises Peterson's result (Petersen 1982), that marginal determinacy implies multivariate determinacy and conjectures that for absolutely continuous functions, multivariate determinacy implies marginal. Therefore we can comfortably apply the estimation results presented in this paper to unbounded distributions if, at the very least on the marginal level, our choice of unbounded reference densities converges to a unique polynomial expression. Furthermore, due to the unique properties of the Gaussian and gamma distributions (and others related, e.g., Chi-Square, Weibull), it has been shown that reference densities of this variety have moment-determinacy (Sánchez-Ruiz and Dehesa 1998;Provost 2005). Therefore this approach has greater application than may appear at first glance. Furthermore, when unsure of the appropriateness of a particular polynomial basis, we can instead focus on reviewing the convergence marginally rather than on the joint density as a whole to gain an idea of moment-determinacy.
In this paper, we proposed a generalised form of a multivariate polynomial-based density expansion, making the estimate applicable to one type of polynomial basis and any hypergeometric type polynomial basis (provided determinacy is assured). This expansion is generated from a generalised multivariate polynomial basis that, by construction, allows for the estimation of joint density functions based on aggregated sufficient statistics, namely the sample moments. We derived critical statistical properties of the moment-based density estimate and suggested a computational strategy by which we can estimate the optimal max polynomial order of the expansion. Through the contributions of this paper, we have demonstrated that applying multivariate polynomial expansion to joint density estimation is beneficial for analytical formulations and can be used as a practical density estimation alternative to existing comparable methods.
Furthermore, we can extend this result to estimate both cumulative and conditional cumulative distribution functions, allowing for the simulation of data from the momentbased density estimates without requiring grid-based sampling techniques. This property has considerable ramifications when producing synthetic representative samples of the original data and imputing missing information, especially when we can only ascertain empirical moments. The production of non-parametric synthetic continuous data based on aggregated statistics is an area of great interest in data privacy research.
Acknowledgements This research was partially completed with support from the Australian Government Research and Training Program.
Funding Open Access funding enabled and organized by CAUL and its Member Institutions.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.

Appendix A: Proof of Theorem 2
Proof Firstly as the integrals on k are all finite, then Furthermore, given that for each k = 1, . . . , N , the set of orthonormal polynomials {P k,n k } n k ∈N 0 are complete in L 2 ( k , μ ν k ). That is, for any function g( then, g(x k ) = 0 for all x k ∈ k a.s.. Therefore for P n 1 ,...,n N (x) = N k=1 P k,n k (x k ) and any function h on (N ) = N k=1 k , then for all x ∈ (N ) , if (N ) h(x)P n 1 ,...,n N (x)dμ ν (x) = 0 for all n 1 , . . . , n N ∈ N 0 , Due to the fact P N ,n N (x N ) is complete, this infers that, for all x N ∈ N a.s., Applying the same reasoning we can see that for all for all n 1 , n 2 ∈ N 0 , which implies for all

Appendix B: Proof of Theorem 3
Proof By the Weierstrass-Stone Approximation (Szökefalvi-Nagy 1965), we know there exists a unique polynomial approximation that converges uniformly to the continuous function f X (x)/ f ν (x). This result is held because {P n 1 ,··· ,n N } n 1 ,...,n N ∈N 0 is a complete orthogonal base. Let C n 1 ,...,n N P n 1 ,...,n N (x).

Appendix C: Proof of Theorem 5
To prove Theorem 5, we need Lemma 1 below. This Lemma provides a vital property as the convergence of the "remainder term" as described in Theorem 4.
Lemma 1 For a dimension j ∈ {1, . . . , N } as well as for any > 0 and m 1 , . . . , m j−1 , m j+1 , . . . , m N ∈ N 0 there exists K j such that for all n j > K j , Proof We will only provide the detailed proof for the case N = 3 for Lemma 1 and for the general N , we can achieve the proof by following the same process outlined for the proof of N = 3. Firstly we note that the finite order multivariate momentbased density converges to the true density as all the elements of the max polynomial order vector K approaches infinity. This property follows as, Therefore, We note therefore that for any > 0 there exists K 0 = (K 0,1 , . . . , K 0,N ) such that (N ) Consider for N = 3 and denote Therefore, for any 0 > 0 we can fix = 0 /2 and note that there therefore exists a K 0 = (K 0,1 , K 0,2 , K 0,3 ) such that T K 0 < 0 /2. Thus, for such K 0 , ∞ n 3 =K 0,3 +1 C 2 n 1 ,n 2 ,n 3 .
Furthermore, following the same process, if we were to continue to partition all the infinite sums we would have Now consider for any m 1 , m 2 the sum m 1 n 1 =0 m 2 n 2 =0 ∞ n 3 =K 0,3 +1 C 2 n 1 ,n 2 ,n 3 .
Therefore we can conclude that if there exists 0 > 0 such that Var X (Ĉ n 1 ,...,n N ) ≥ 0 for all n = (n 1 , . . . , n N ) = (0, . . . , 0), then for any m 1 , . . . , m j−1 , m j+1 , . . . , m N there exists a K j ( 0 ) > 0 such that for all m j where m j > K j ( 0 ) and m = (m 1 , . . . , m N ) then As this applies to any dimension j ∈ {1, . . . , N } then we can say that there exists a vector K 0 whose elements are given by K 0, j = K j for each j = 1, . . . , N such that for any max polynomial order K = (K 1 , . . . , K N ) not less than K 0 . then, Hence given that E N K {X i } M i=1 > 0 for any K ∈ N N 0 , then an optimal max polynomial order (as defined in Definition 5) K * given by K } can also be determined by considering the finite set K = {K = (K 1 , . . . , K N ) : K i ∈ N 0 and K i ≤ K 0,i for each i = 1, . . . , N } which is finite as ||K|| c = N i=1 (K 0,i + 1) < ∞. We note that for all K ∈ N N 0 \K, .
is an infimum to the set : K ∈ N N 0 \K} and therefore we can say as K 0 ∈ K, that K * = arg min Noting that all finite sets must have a minimum, we can then be sure that if there exists 0 > 0 such that Var X (Ĉ n 1 ,...,n N ) ≥ 0 for all n 1 , . . . , n N ∈ N 0 where (n 1 , . . . , n N ) = (0, . . . , 0), then the expected N K -Norm (Definition 4) has a finite optimal max polynomial order K * .