code: def var(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      correction: Union[int, float] = 0.0,
      keepdims: bool = False,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Calculate the variance of the input array x.
  
      **Special Cases**
  
      Let N equal the number of elements over which to compute the variance.
  
      If N - correction is less than or equal to 0, the variance is NaN.
  
      If x_i is NaN, the variance is NaN (i.e., NaN values propagate).
  
      Parameters
      ----------
      x
          input array. Should have a floating-point data type.
      axis
          axis or axes along which variances must be computed. By default, the variance
          must be computed over the entire array. If a tuple of integers, variances must
          be computed over multiple axes. Default: ``None``.
      correction
          degrees of freedom adjustment. Setting this parameter to a value other than 0
          has the effect of adjusting the divisor during the calculation of the variance
          according to N-c where N corresponds to the total number of elements over which
          the variance is computed and c corresponds to the provided degrees of freedom
          adjustment. When computing the variance of a population, setting this parameter
          to 0 is the standard choice (i.e., the provided array contains data constituting
          an entire population). When computing the unbiased sample variance, setting this
          parameter to 1 is the standard choice (i.e., the provided array contains data
          sampled from a larger population; this is commonly referred to as Bessel's
          correction). Default: ``0``.
      keepdims
          if True, the reduced axes (dimensions) must be included in the result as
          singleton dimensions, and, accordingly, the result must be compatible with the
          input array (see Broadcasting). Otherwise, if False, the reduced axes
          (dimensions) must not be included in the result. Default: ``False``.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          if the variance was computed over the entire array, a zero-dimensional array
          containing the variance; otherwise, a non-zero-dimensional array containing the
          variances. The returned array must have the same data type as x.
  
  
      This method conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.var.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([0.1, 0.2, 0.3, 0.3, 0.9, 0.10])
      >>> y = ivy.var(x)
      >>> print(y)
      ivy.array(0.07472222)
  
      >>> x = ivy.array([0.1, 0.2, 0.3, 0.3, 0.9, 0.10])
      >>> y = ivy.array(0.0)
      >>> ivy.var(x, out=y)
      >>> print(y)
      ivy.array(0.07472222)
  
      >>> x = ivy.array([[0.1, 0.2, 0.3], [0.3, 0.9, 0.10]])
      >>> print(ivy.var(x, axis=1, keepdims=True))
      ivy.array([[0.00666667],
         [0.11555555]])
  
      >>> x = ivy.array([[0.1, 0.2, 0.3], [0.3, 0.9, 0.10]])
      >>> y = ivy.var(x, correction=1)
      >>> print(y)
      ivy.array(0.08966666)
  
      With :class:`ivy.Container` input:
      >>> x = ivy.Container(a=ivy.array([0.1, 0.2, 0.9]),
      ...                   b=ivy.array([0.7, 0.1, 0.9]))
      >>> y = ivy.var(x)
      >>> print(y)
      {
          a: ivy.array(0.12666667),
          b: ivy.array(0.11555555)
      }
      """
      return current_backend(x).var(
          x,
          axis=axis,
          correction=correction,
          keepdims=keepdims,
          out=out,
      )
  
file_path: ivy/ivy/functional/ivy/statistical.py
imports: from typing import Union, Optional, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 8 for calling a global function with example usage: var() and returns: current_backend