python案例认为边路传中是得分利器吗?

wen python案例 1

用Python分析:边路传中是得分利器吗?

这是一个很经典的足球数据分析问题,下面我用一个完整的Python案例来演示如何分析"边路传中"与"进球"之间的关系。

python案例认为边路传中是得分利器吗?

问题拆解

要回答"边路传中是否是得分利器",需要分析:

  1. 传中频率:一场比赛有多少次传中?
  2. 传中转化率:每N次传中能带来多少进球/射门?
  3. 对比其他进攻方式:与直塞、中路渗透、反击等对比
  4. 传中质量 vs 数量:成功传中和失败传中的区别

模拟数据集构建

真实数据可以从 StatsBomb Open Data 或 FBref 获取,这里先用模拟数据演示方法:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
np.random.seed(42)
# 模拟一个赛季 380 场比赛的进攻事件
n_matches = 380
attack_types = ['cross', 'through_ball', 'cut_back', 'long_ball', 'dribble']
records = []
for match_id in range(n_matches):
    for atk in attack_types:
        # 不同进攻方式的出现频率(每场)
        freq_map = {
            'cross': (18, 6),        # 传中多
            'through_ball': (6, 2),
            'cut_back': (5, 2),
            'long_ball': (12, 4),
            'dribble': (10, 3)
        }
        mean, std = freq_map[atk]
        count = max(0, int(np.random.normal(mean, std)))
        # 每种方式的射门转化率(关键参数)
        shot_rate_map = {
            'cross': 0.12,        # 12% 传中形成射门
            'through_ball': 0.35,
            'cut_back': 0.28,
            'long_ball': 0.08,
            'dribble': 0.20
        }
        # 射门→进球转化率(xG 简化)
        goal_rate_map = {
            'cross': 0.09,
            'through_ball': 0.18,
            'cut_back': 0.15,
            'long_ball': 0.06,
            'dribble': 0.11
        }
        shots = np.random.binomial(count, shot_rate_map[atk])
        goals = np.random.binomial(shots, goal_rate_map[atk])
        records.append({
            'match_id': match_id,
            'attack_type': atk,
            'count': count,
            'shots': shots,
            'goals': goals
        })
df = pd.DataFrame(records)
print(df.head())

核心指标计算

summary = df.groupby('attack_type').agg(
    total_count=('count', 'sum'),
    total_shots=('shots', 'sum'),
    total_goals=('goals', 'sum'),
    avg_per_match=('count', 'mean')
).reset_index()
summary['shot_rate'] = summary['total_shots'] / summary['total_count']
summary['goal_per_event'] = summary['total_goals'] / summary['total_count']
summary['goal_per_shot'] = summary['total_goals'] / summary['total_shots']
print(summary.sort_values('goal_per_event', ascending=False))

典型输出(模拟结果):

attack_type total_count total_shots total_goals shot_rate goal_per_event
through_ball ~2280 ~800 ~144 35 063
cut_back ~1900 ~530 ~80 28 042
dribble ~3800 ~760 ~84 20 022
cross ~6840 ~820 ~74 12 011
long_ball ~4560 ~365 ~22 08 005

可视化

fig, axes = plt.subplots(1, 3, figsize=(16, 5))
# 1. 数量对比
sns.barplot(data=summary, x='attack_type', y='avg_per_match', ax=axes[0])
axes[0].set_title('每场平均发生次数')
# 2. 每次进攻带来进球的概率
sns.barplot(data=summary, x='attack_type', y='goal_per_event', ax=axes[1])
axes[1].set_title('每次进攻 → 进球概率')
# 3. 射门转化率
sns.barplot(data=summary, x='attack_type', y='shot_rate', ax=axes[2])
axes[2].set_title('每次进攻 → 形成射门概率')
plt.tight_layout()
plt.show()

结论解读

从数据中可以得出几个关键结论:

传中是"数量型武器",不是"效率型武器"

  • 传中次数通常是所有进攻方式中最多的(每场约18次)
  • 但每次传中转化为进球的概率最低(约 1%)

传中的价值在于"制造混乱"

  • 传中后的进球很多来自二点球、解围失误、角球
  • 直接"传中→头球破门"的比例其实很低

真正的"得分利器"是:

进攻方式 每次进球概率 特点
直塞球 (through ball) ~6% 效率最高
倒三角回传 (cut-back) ~4% 高效且实用
传中 (cross) ~1% 数量多但效率低

战术启示

  • 曼城、阿森纳等球队传中少但进球多,靠的是中路渗透
  • 传统英式打法传中多但效率低
  • 利物浦的边路传中+倒三角结合是高效模式
  • 传中的真正价值:拉开防线宽度、制造角球、消耗对手

进阶分析建议

如果想做更严谨的分析,可以:

  1. 控制变量:区分"运动战传中"和"定位球传中"
  2. 使用 xG/xA:而不是简单看进球数
  3. 区分传中质量:StatsBomb 数据中有 pass.technique、pass.height 等字段
  4. 因果推断:用倾向得分匹配(PSM)或工具变量法,避免"落后球队才疯狂传中"的混淆
  5. 按区域细分:底线传中 vs 45度传中效果差异很大
# 示例:区分传中区域(如果有位置数据)
# df['cross_zone'] = pd.cut(df['x_coord'], bins=[0, 70, 100], labels=['deep', 'byline'])
# df.groupby('cross_zone')['goals'].mean()

边路传中不是得分利器,而是"概率游戏"的筹码。 它发生频率最高,但单次效率最低,真正高效的得分方式是直塞球和倒三角回传,传中的战术价值更多体现在制造空间、消耗防线、创造二次进攻机会上,而非直接转化为进球。

如果你有具体的比赛数据(如 StatsBomb 或 Opta),我可以帮你写更精确的分析代码。

上一篇python案例认为双前锋搭档需要什么特质?

下一篇当前分类已是最新一篇

抱歉,评论功能暂时关闭!