You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何基于抽样数据计算Twitter账号X与Y的共同粉丝占比?

Calculating the Probability That a Follower of X Also Follows Y

Hey there! Let's sort this out step by step, and first correct a common misconception in your initial thought.

First: Why Your Initial Formula Doesn't Apply

p(A∩B)=p(B)*p(A)

This formula only works if events A and B are statistically independent—meaning one event happening has no impact on the other. But "following account X" and "following account Y" are almost never independent (e.g., if they're in the same niche, followers are far more likely to overlap). So we can't rely on this formula here.

What We Actually Need to Calculate

Your goal is to find the probability that a random follower of X also follows Y. Let's break down the numbers you have:

  • ( X_{\text{fans}} ): Total followers of X in your dataset (47,000)
  • ( X∩Y_{\text{fans}} ): Unique users who follow both X and Y (you noted this is 600—since the 1200 duplicates come from each mutual fan appearing once in X's list and once in Y's list)

The probability you want is simply the ratio of overlapping followers to X's total followers:

# In R, using your existing fan vectors
common_fans <- length(intersect(x_fans, y_fans))
probability <- common_fans / length(x_fans)

# Plugging in your numbers:
probability <- 600 / 47000  # ≈ 0.0128, or ~1.28%
  • If you wanted the reverse (probability a follower of Y also follows X): ( 600 / 61000 ≈ 0.0098 ), or ~0.98%
  • If you wanted the probability a random Twitter user follows both, we can't calculate that without knowing the platform's total user count—but that's probably not what you're targeting here.

内容的提问来源于stack exchange,提问作者user9115742

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 06:40:56