Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ClickHouse launches Claude-powered Agents and House Mates partner program at Open House 2026 Read more →
contingency 函数用于计算列联相关系数,该值用于衡量表中两列之间的关联性。其计算方式与 cramersV 函数类似,但平方根中的分母不同。
contingency
cramersV
contingency(column1, column2)
column1
Any
column2
Float64
SELECT cramersV(a, b), contingency(a, b) FROM ( SELECT number % 10 AS a, number % 4 AS b FROM numbers(150) );
┌─────cramersV(a, b)─┬──contingency(a, b)─┐ │ 0.5798088336225178 │ 0.708607540104077 │ └────────────────────┴────────────────────┘
此页面对您有帮助吗?