学生分布

Let \(X_1\), \(\ldots\), \(X_n\) be independent and identically distributed as \(N(\mu, \sigma^2)\), i.e. this is a sample of size \(n\) from a normally distributed population with expected value \(\mu\) and variance \(\sigma^2\).
Let
\begin{align}
{\bar {X}}={\frac{1}{n}}\sum_{i=1}^{n}X_{i}
\end{align}
be the sample mean and let
\begin{align}
S^{2}={\frac{1}{n-1}}\sum_{i=1}^{n}(X_{i}-{\bar{X}})^{2}
\end{align}

be the (Bessel-corrected) sample variance. Then the random variable
\begin{align}
\frac{\bar{X} - \mu}{\sigma / \sqrt{n}}
\end{align}
has a standard normal distribution (i.e. normal with expected value 0 and variance 1), and the random variable
\begin{align}
\frac{\bar{X} - \mu}{S / \sqrt{n}}
\end{align}
(where we have simply put \(S\) (the square root of the sample variance) where \(\sigma\) had appeared) has a Student's \(t\)-distribution with \(n − 1\) degrees of freedom.

Reference: https://en.wikipedia.org/wiki/Student%27s_t-distribution
http://shujuren.org/article/104.html

转载于:https://www.cnblogs.com/songtianyu/p/6078065.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
8. 查询学生表中性别为 “女”、所在城市为“株洲”的学生姓名、出生日期。 ``` SELECT name,birthday FROM student WHERE gender='女' AND city='株洲'; ``` 9. 查询出生年份在1992年的学生姓名、性别、所在城市。 ``` SELECT name,gender,city FROM student WHERE YEAR(birthday)=1992; ``` 10. 查询所有学生分布的城市。 ``` SELECT DISTINCT city FROM student; ``` 11. 查询《数据库应用技术》课程成绩大于等于80,小于等于90的学生学号、姓名。 ``` SELECT student_id,name FROM score WHERE course_name='数据库应用技术' AND score>=80 AND score<=90; ``` 12. 查询所有学生的选课信息,包括学号、姓名、性别、课程名、成绩。 ``` SELECT student.student_id,student.name,student.gender,score.course_name,score.score FROM student INNER JOIN score ON student.student_id=score.student_id; ``` 13、查询《java編程》这门课最高分学生的学号、姓名。 ``` SELECT student_id,name FROM score WHERE course_name='java編程' AND score = (SELECT MAX(score) FROM score WHERE course_name='java編程'); ``` 14.统计每个学生的平均分,统计结果包括学号、平均成绩。 ``` SELECT student_id, AVG(score) AS avg_score FROM score GROUP BY student_id; ``` 15.查询课程平均分数大于80分的课程名称及课程平均分。 ``` SELECT course_name, AVG(score) AS avg_score FROM score GROUP BY course_name HAVING AVG(score) > 80; ``` 16.统计每门课程的选课人数,統计结果包括课程名、人数。 ``` SELECT course_name, COUNT(DISTINCT student_id) AS num_of_students FROM score GROUP BY course_name; ``` 17.在学生信息表的姓名列上建立普通索引。 ``` ALTER TABLE student ADD INDEX name_index(name); ``` 18.查询所有学生学号,姓名,年龄(使用year函数)。 ``` SELECT student_id,name,YEAR(NOW())-YEAR(birthday) AS age FROM student; ``` 19.创建视图,包含数据应用技术成績大于80分学生的学号、姓名、出生日期。 ``` CREATE VIEW score_view AS SELECT student.student_id, student.name, student.birthday FROM student INNER JOIN score ON student.student_id=score.student_id WHERE score.course_name='数据库应用技术' AND score.score>80; SELECT * FROM score_view; ``` 20.删除课程号为03的课程信息。 ``` DELETE FROM course WHERE course_id='03'; ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值