Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.68 KB

Excel.WorksheetFunction.Covariance_P.md

File metadata and controls

55 lines (32 loc) · 1.68 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
WorksheetFunction.Covariance_P method (Excel)
vbaxl10.chm137363
vbaxl10.chm137363
Excel.WorksheetFunction.Covariance_P
a1cc46fe-e725-3d29-d3d3-1c6a56a67abf
05/22/2019
medium

WorksheetFunction.Covariance_P method (Excel)

Returns population covariance, the average of the products of deviations for each data point pair.

Syntax

expression.Covariance_P (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Variant The first cell range of integers.
Arg2 Required Variant The second cell range of integers.

Return value

Double

Remarks

Use Covariance_P to determine the relationship between two data sets. For example, you can examine whether greater income accompanies greater levels of education.

The arguments must either be numbers or be names, arrays, or references that contain numbers.

If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.

If Arg1 and Arg2 have different numbers of data points, Covariance_P generates an error.

If either Arg1 or Arg2 is empty, Covariance_P generates an error.

The covariance is as follows, where x and y are the sample means AVERAGE(array1) and AVERAGE(array2), and n is the sample size:

Formula

[!includeSupport and feedback]