统计代写|属性数据分析作业代写analysis of categorical data代考|Association Between Two Categorical Variables
如果你也在 怎样代写属性数据分析analysis of categorical data这个学科遇到相关的难题,请随时右上角联系我们的24/7代写客服。
属性数据分析analysis of categorical data一属性变量和属性数据,通常所指属性数据,反映事物属性的数据,也称为定性数据或类别数据,它是属性变量取的值。分类数据是指将一个观察结果归入一个或多个类别的数据。例如,一个项目可能被评判为好或坏,或者对调查的反应可能包括同意、不同意或无意见等类别。Statgraphics包括许多处理这类数据的程序,包括包含在方差分析、回归分析和统计过程控制部分的建模程序。
statistics-lab™ 为您的留学生涯保驾护航 在代写属性数据分析analysis of categorical data方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写属性数据分析analysis of categorical data方面经验极为丰富,各种代写属性数据分析analysis of categorical data相关的作业也就用不着说。
我们提供的属性数据分析analysis of categorical data及其相关学科的代写,服务范围广, 其中包括但不限于:
- Statistical Inference 统计推断
- Statistical Computing 统计计算
- Advanced Probability Theory 高等楖率论
- Advanced Mathematical Statistics 高等数理统计学
- (Generalized) Linear Models 广义线性模型
- Statistical Machine Learning 统计机器学习
- Longitudinal Data Analysis 纵向数据分析
- Foundations of Data Science 数据科学基础
统计代写|属性数据分析作业代写analysis of categorical data代考|Contingency Tables for Two Categorical Variables
To measure the association between two categorical variables, we use a contingency table that summarizes the (joint) frequencies observed in each category of the variables. For example, as we were first writing this chapter, the race between Hillary Clinton and Barack Obama for the 2008 democratic presidential candidacy was still undecided and very much in the news. Suppose that we would like to know whether there is an association between voter gender and candidate choice in the Wisconsin Democratic Primary.
In an exit poll of $1,442 \mathrm{~W}$ isconsin voters, $42 \%$ males and $58 \%$ females, it was observed that $67 \%$ of the males and $50 \%$ of the females voted for Obama (CNN Election Center, 2008). Table $4.1$ presents the $2-b y-2(2 \times 2)$ contingency table used to summarize the frequencies for the variables of gender (male or female) and candidate choice (Clinton or Obama).
We use Table $4.1$ to introduce some notation and terminology for contingency tables. First, the total number of categories for the row variable is denoted by $I$, with each category
indexed by $i$, while the total number of categories for the column variable is denoted by $J$, with each category indexed by $j$. In our example, Gender has $I=2$ categories (e.g., $i=1$ for Males; $i=2$ for Females) and Candidate has $J=2$ categories (e.g., $j=1$ for Clinton; $j=2$ for Obama). In general, the size of the contingency table is denoted as $I \times J$ (i.e., $2 \times 2$ in our example).
The frequency in each cell of the table, called a joint frequency, is denoted by $n_{i j}$. Each number that appears in boldface in Table $4.1$ is a joint, or cell, frequency. For example, $\mathrm{n}{11}$ in Table $4.1$ represents the number of voters who are male $(i=1)$ and voted for Clinton $(j=1)$, so $\mathrm{n}{11}=200$, while $\mathrm{n}{12}$ in Table $4.1$ represents the number of voters who are male $(i=1)$ and voted for Obama $(j=2)$, so $n{12}=406$. Taken together, the cell frequencies represent the joint distribution of the two categorical variables. It is important to note that each individual observation can only be counted once so it must appear in (or be classified into) one and only one cell of the table.
Each frequency appearing in the margins of the table is called a marginal frequency and represents the row or column total for one category of one variable. A marginal frequency for a row is denoted by $\mathrm{n}{i+}$ and a marginal frequency for a column is denoted by $\mathrm{n}{+j}$. The marginal frequencies are shaded in Table 4.1. For example, the row total or marginal frequency for males in Table $4.1$ is $\mathrm{n}{1+}=606$ (and represents the total number of males in the sample), while the marginal frequency for females is $\mathrm{n}{2+}=836$ (and represents the total number of females in the sample). Similarly, $\mathrm{n}{+1}=618$ is the column marginal frequency for Clinton voters and $n{+2}=824$ is the column marginal frequency for Obama voters. Together, the marginal frequencies for the rows (or columns) represent the marginal distribution of the row (or column) variable. Finally, the overall total number of observations is denoted by $n_{++}$, so in this example $\mathrm{n}_{++}=1442$.
Each of the cell frequencies can be converted to a joint proportion (or probability) by dividing the cell frequency by the total number of observations. In the population these cell proportions are denoted by $\pi_{i,}$, whereas in the sample they are denoted by $p_{i j}=n_{i j} / n_{++}$. Similarly, each of the marginal frequencies $\left(\mathrm{n}{i+}\right.$ or $\left.\mathrm{n}{+}\right)$can be converted to a marginal proportion or probability when divided by the total number of observations. For example, from Table 4.1, the joint proportion of voters who are female and voted for Clinton is $p_{21}=\mathrm{n}{21} /$ $\mathrm{n}{++}=418 / 1442=0.29$, and the marginal proportion of voters who voted for Clinton is $p_{+1}=$ $\mathrm{n}{+1} / \mathrm{n}{++}=618 / 1442=0.43$.
统计代写|属性数据分析作业代写analysis of categorical data代考|Independence
Just as we typically use the correlation coefficient to evaluate the association between two continuous variables, we use a value called the odds ratio to evaluate the association between two categorical variables. Before we define and discuss the odds ratio, however, we expand a
bit on the idea of independence between two variables, which is a key concept in categorical data analysis.
When two categorical variables are independent of each other, they are not associated. For example, if gender and candidate choice are independent variables, then one is not associated with the other, meaning that we would be able to predict candidate choice just as well regardless of whether we knew the voter’s gender. Thus, if knowing a voter’s gender does not help to predict the candidate chosen by that voter, then there is no relationship between gender and candidate choice and these two variables are independent. Further, if knowing the value (category) of one variable has no effect on predicting the value (category) of the other, then the column probability distribution should be the same in each row and the row probability distribution should be the same in each column. In our example (Table 4.1), this would mean that the overall candidate (column) probability distribution of $43 \%(618 / 1442$ ) for Clinton and $57 \%(824 / 1442)$ for Obama should also be the candidate choice distribution obtained for both males and females. That is, if independence holds, then $43 \%$ of the 606 males would be expected to vote for Clinton and the remaining $57 \%$ of the males would be expected to vote for Obama. Similarly, $43 \%$ of the 836 females would be expected to vote for Clinton and the remaining $57 \%$ would be expected to vote for Obama. This is illustrated in Table $4.2$. Formally, this can be stated as $\pi_{i j} / \pi_{i+}=\pi_{+j}$ for each column $(j=1,2, \ldots, J)$ or $\pi_{i j} / \pi_{+j}=\pi_{i+}$ for each row $(i=1,2, \ldots, I)$. Rearranging either of these formulas, this relationship can also be formally stated as $\pi_{i}=\pi_{i+} \pi_{+j}$
In statistical terms, if, in the population, two variables are independent, then their joint probability $\left(\pi_{i j}\right)$ can be determined solely on the basis of the marginal probabilities $\left(\pi_{i+} \pi_{+}\right)$. As usual, these population parameters can be estimated using sample data. For instance, using our example in Table 4.1, if gender and voting choice were independent, then the probability of a woman voting for Clinton could be obtained from multiplying the probability of a voter being female by the probability of a voter choosing Clinton:
$$
\begin{aligned}
p_{21} &=\left(p_{2+}\right)\left(p_{+1}\right) \
&=(\text { Proportion of females })(\text { Proportion choosing Clinton }) \
&=(836 / 1442)(618 / 1442)=(0.58)(0.43)=0.25
\end{aligned}
$$
So, if independence holds, we would expect that $25 \%$ of the 1,442 voters would be females who voted for Clinton, and we could similarly obtain the expected probabilities (and frequencies) for all other cells in the contingency table. This mathematical relationship between the joint and marginal probabilities will not hold if there is an association between the two variables. These computations are further discussed and demonstrated in Section 4.4.
统计代写|属性数据分析作业代写analysis of categorical data代考|Odds Ratio
The odds of an event occurring (sometimes also labeled a “success”, as in Chapter 2 ) are the probability that the event occurs relative to the probability that the event does not occur. For example, if the odds that a student in the United States will graduate from high school are $2.5$, then the probability that the student will graduate is $2.5$ times greater than the probability that the student will not graduate. If the probability that the event occurs in the population is $\pi$, then the odds that the event occurs are
$\mathrm{Odds}=\frac{\pi}{1-\pi}$
Rearranging Equation $4.1$ to solve for the probability, we obtain
$$
\begin{aligned}
&\text { Odds }=\frac{\pi}{1-\pi} \
&\text { Odds }(1-\pi)=\pi \
&\text { Odds }-\text { Odds }(\pi)=\pi \
&\text { Odds }=\pi+\text { Odds }(\pi) \
&\text { Odds }=\pi(1+\text { Odds }) \
&\frac{\text { Odds }}{1+\text { Odds }}=\pi
\end{aligned}
$$
In other words, while the odds are expressed in terms of the probability in Equation $4.1$, the probability can be expressed in terms of the odds by the equation
$$
\pi=\frac{\text { Odds }}{1+\text { Odds }}
$$
So, for example, if the odds of graduating from high school are $2.5$, the probability of graduating from high school would be
$$
\pi=\frac{2.5}{1+2.5}=\frac{2.5}{3.5}=0.71
$$
属性数据分析
统计代写|属性数据分析作业代写analysis of categorical data代考|Contingency Tables for Two Categorical Variables
为了测量两个分类变量之间的关联,我们使用一个列联表来总结在每个变量类别中观察到的(联合)频率。例如,当我们第一次写这一章时,希拉里·克林顿和巴拉克·奥巴马之间的 2008 年民主总统候选人竞选仍未决定,而且在新闻中很常见。假设我们想知道威斯康星州民主党初选中的选民性别和候选人选择之间是否存在关联。
在一项出口民意调查中1,442 在伊斯康辛选民,42%男性和58%女性,据观察67%男性和50%的女性投票给奥巴马(CNN 选举中心,2008 年)。桌子4.1提出了2−b是−2(2×2)列联表用于总结性别(男性或女性)和候选人选择(克林顿或奥巴马)变量的频率。
我们使用表4.1介绍列联表的一些符号和术语。首先,行变量的类别总数表示为一世, 每个类别
索引为一世,而列变量的类别总数表示为Ĵ,每个类别由j. 在我们的示例中,性别有一世=2类别(例如,一世=1男性;一世=2女性)和候选人有Ĵ=2类别(例如,j=1对于克林顿;j=2奥巴马)。通常,列联表的大小表示为一世×Ĵ(IE,2×2在我们的示例中)。
表中每个单元格中的频率,称为联合频率,表示为n一世j. 表中以粗体显示的每个数字4.1是联合或单元频率。例如,n11在表中4.1代表男性选民的数量(一世=1)并投票给克林顿(j=1), 所以n11=200, 尽管n12在表中4.1代表男性选民的数量(一世=1)并投票给奥巴马(j=2), 所以n12=406. 总之,单元频率表示两个分类变量的联合分布。重要的是要注意,每个单独的观察只能计算一次,因此它必须出现(或分类到)表格的一个且仅一个单元格中。
出现在表格边缘的每个频率称为边缘频率,代表一个变量的一个类别的行或列总数。行的边际频率表示为n一世+并且一列的边际频率表示为n+j. 边缘频率在表 4.1 中用阴影表示。例如,表中男性的行总频率或边际频率4.1是n1+=606(并代表样本中男性的总数),而女性的边际频率为n2+=836(并代表样本中的女性总数)。相似地,n+1=618是克林顿选民的列边际频率,并且n+2=824是奥巴马选民的列边际频率。行(或列)的边际频率共同表示行(或列)变量的边际分布。最后,观察总数表示为n++, 所以在这个例子中n++=1442.
通过将单元频率除以观察总数,可以将每个单元频率转换为联合比例(或概率)。在群体中,这些细胞比例表示为圆周率一世,,而在样本中它们表示为p一世j=n一世j/n++. 同样,每个边缘频率(n一世+或者n+)当除以观察总数时,可以转换为边际比例或概率。例如,从表 4.1 中,投票给克林顿的女性选民的联合比例为p21=n21/ n++=418/1442=0.29,投票给克林顿的选民的边际比例是p+1= n+1/n++=618/1442=0.43.
统计代写|属性数据分析作业代写analysis of categorical data代考|Independence
正如我们通常使用相关系数来评估两个连续变量之间的关联一样,我们使用一个称为优势比的值来评估两个分类变量之间的关联。然而,在我们定义和讨论优势比之前,我们先扩展一个
关于两个变量之间独立性的概念,这是分类数据分析中的一个关键概念。
当两个分类变量相互独立时,它们不相关。例如,如果性别和候选人选择是自变量,那么其中一个与另一个无关,这意味着无论我们是否知道选民的性别,我们都能够很好地预测候选人的选择。因此,如果知道选民的性别并不能帮助预测该选民选择的候选人,那么性别和候选人选择之间就没有关系,这两个变量是独立的。此外,如果知道一个变量的值(类别)对预测另一个变量的值(类别)没有影响,那么每一行的列概率分布应该相同,每一列的行概率分布应该相同. 在我们的示例中(表 4.1),43%(618/1442) 对于克林顿和57%(824/1442)奥巴马的候选人选择分布也应该是男性和女性的候选人选择分布。也就是说,如果独立性成立,那么43%预计将有 606 名男性投票给克林顿,其余的57%预计男性将投票给奥巴马。相似地,43%预计 836 名女性将投票给克林顿,其余的57%预计将投票给奥巴马。这在表中说明4.2. 形式上,这可以表述为圆周率一世j/圆周率一世+=圆周率+j对于每一列(j=1,2,…,Ĵ)或者圆周率一世j/圆周率+j=圆周率一世+对于每一行(一世=1,2,…,一世). 重新排列这些公式中的任何一个,这种关系也可以正式表述为圆周率一世=圆周率一世+圆周率+j
用统计术语来说,如果在总体中,两个变量是独立的,那么它们的联合概率(圆周率一世j)可以仅根据边际概率来确定(圆周率一世+圆周率+). 像往常一样,可以使用样本数据估计这些总体参数。例如,使用我们在表 4.1 中的示例,如果性别和投票选择是独立的,那么女性投票给克林顿的概率可以通过将选民是女性的概率乘以选民选择克林顿的概率来获得:
p21=(p2+)(p+1) =( 女性比例 )( 选择克林顿的比例 ) =(836/1442)(618/1442)=(0.58)(0.43)=0.25
因此,如果独立性成立,我们预计25%在 1,442 名选民中,将是投票给克林顿的女性,我们同样可以获得列联表中所有其他单元格的预期概率(和频率)。如果两个变量之间存在关联,则联合概率和边际概率之间的这种数学关系将不成立。这些计算将在 4.4 节中进一步讨论和演示。
统计代写|属性数据分析作业代写analysis of categorical data代考|Odds Ratio
事件发生的几率(有时也称为“成功”,如第 2 章所示)是事件发生的概率相对于事件不发生的概率。例如,如果美国学生从高中毕业的几率是2.5,则学生毕业的概率为2.5比学生不毕业的概率大几倍。如果事件在总体中发生的概率是圆周率, 那么事件发生的几率是
这dds=圆周率1−圆周率
重排方程4.1为了求解概率,我们得到
赔率 =圆周率1−圆周率 赔率 (1−圆周率)=圆周率 赔率 − 赔率 (圆周率)=圆周率 赔率 =圆周率+ 赔率 (圆周率) 赔率 =圆周率(1+ 赔率 ) 赔率 1+ 赔率 =圆周率
换句话说,虽然几率用方程式中的概率表示4.1,概率可以用等式的几率表示
圆周率= 赔率 1+ 赔率
因此,例如,如果高中毕业的几率是2.5,高中毕业的概率为
圆周率=2.51+2.5=2.53.5=0.71
统计代写请认准statistics-lab™. statistics-lab™为您的留学生涯保驾护航。统计代写|python代写代考
随机过程代考
在概率论概念中,随机过程是随机变量的集合。 若一随机系统的样本点是随机函数,则称此函数为样本函数,这一随机系统全部样本函数的集合是一个随机过程。 实际应用中,样本函数的一般定义在时间域或者空间域。 随机过程的实例如股票和汇率的波动、语音信号、视频信号、体温的变化,随机运动如布朗运动、随机徘徊等等。
贝叶斯方法代考
贝叶斯统计概念及数据分析表示使用概率陈述回答有关未知参数的研究问题以及统计范式。后验分布包括关于参数的先验分布,和基于观测数据提供关于参数的信息似然模型。根据选择的先验分布和似然模型,后验分布可以解析或近似,例如,马尔科夫链蒙特卡罗 (MCMC) 方法之一。贝叶斯统计概念及数据分析使用后验分布来形成模型参数的各种摘要,包括点估计,如后验平均值、中位数、百分位数和称为可信区间的区间估计。此外,所有关于模型参数的统计检验都可以表示为基于估计后验分布的概率报表。
广义线性模型代考
广义线性模型(GLM)归属统计学领域,是一种应用灵活的线性回归模型。该模型允许因变量的偏差分布有除了正态分布之外的其它分布。
statistics-lab作为专业的留学生服务机构,多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务,包括但不限于Essay代写,Assignment代写,Dissertation代写,Report代写,小组作业代写,Proposal代写,Paper代写,Presentation代写,计算机作业代写,论文修改和润色,网课代做,exam代考等等。写作范围涵盖高中,本科,研究生等海外留学全阶段,辐射金融,经济学,会计学,审计学,管理学等全球99%专业科目。写作团队既有专业英语母语作者,也有海外名校硕博留学生,每位写作老师都拥有过硬的语言能力,专业的学科背景和学术写作经验。我们承诺100%原创,100%专业,100%准时,100%满意。
机器学习代写
随着AI的大潮到来,Machine Learning逐渐成为一个新的学习热点。同时与传统CS相比,Machine Learning在其他领域也有着广泛的应用,因此这门学科成为不仅折磨CS专业同学的“小恶魔”,也是折磨生物、化学、统计等其他学科留学生的“大魔王”。学习Machine learning的一大绊脚石在于使用语言众多,跨学科范围广,所以学习起来尤其困难。但是不管你在学习Machine Learning时遇到任何难题,StudyGate专业导师团队都能为你轻松解决。
多元统计分析代考
基础数据: $N$ 个样本, $P$ 个变量数的单样本,组成的横列的数据表
变量定性: 分类和顺序;变量定量:数值
数学公式的角度分为: 因变量与自变量
时间序列分析代写
随机过程,是依赖于参数的一组随机变量的全体,参数通常是时间。 随机变量是随机现象的数量表现,其时间序列是一组按照时间发生先后顺序进行排列的数据点序列。通常一组时间序列的时间间隔为一恒定值(如1秒,5分钟,12小时,7天,1年),因此时间序列可以作为离散时间数据进行分析处理。研究时间序列数据的意义在于现实中,往往需要研究某个事物其随时间发展变化的规律。这就需要通过研究该事物过去发展的历史记录,以得到其自身发展的规律。
回归分析代写
多元回归分析渐进(Multiple Regression Analysis Asymptotics)属于计量经济学领域,主要是一种数学上的统计分析方法,可以分析复杂情况下各影响因素的数学关系,在自然科学、社会和经济学等多个领域内应用广泛。
MATLAB代写
MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中,其中问题和解决方案以熟悉的数学符号表示。典型用途包括:数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发,包括图形用户界面构建MATLAB 是一个交互式系统,其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题,尤其是那些具有矩阵和向量公式的问题,而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问,这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展,得到了许多用户的投入。在大学环境中,它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域,MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要,工具箱允许您学习和应用专业技术。工具箱是 MATLAB 函数(M 文件)的综合集合,可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。