Submit Search
Upload
Data analysis-for-highschool-students
•
Download as PPTX, PDF
•
0 likes
•
466 views
N
naoki yamagishi
Follow
データ分析分野の高校生向けの授業用につくったスライドです。
Read less
Read more
Data & Analytics
Report
Share
Report
Share
1 of 127
Download now
Recommended
Data analysis-for-highschool-students
Data analysis-for-highschool-students
naoki yamagishi
2013年度秋学期 統計学 第4回「データを「分布」で見る」
2013年度秋学期 統計学 第4回「データを「分布」で見る」
Akira Asano
2014年度春学期 統計学 第4回 データを「分布」で見る (2014. 5. 1)
2014年度春学期 統計学 第4回 データを「分布」で見る (2014. 5. 1)
Akira Asano
統計学復習01
統計学復習01
Daichi Ito
2022年度秋学期 統計学 第4回 データを「分布」で見る (2022. 10. 18)
2022年度秋学期 統計学 第4回 データを「分布」で見る (2022. 10. 18)
Akira Asano
有意性と効果量について しっかり考えてみよう
有意性と効果量について しっかり考えてみよう
Ken Urano
Lecture materials(20180820v1)
Lecture materials(20180820v1)
Kunihiro Hisatsune
Regression2
Regression2
Yuta Tomomatsu
Recommended
Data analysis-for-highschool-students
Data analysis-for-highschool-students
naoki yamagishi
2013年度秋学期 統計学 第4回「データを「分布」で見る」
2013年度秋学期 統計学 第4回「データを「分布」で見る」
Akira Asano
2014年度春学期 統計学 第4回 データを「分布」で見る (2014. 5. 1)
2014年度春学期 統計学 第4回 データを「分布」で見る (2014. 5. 1)
Akira Asano
統計学復習01
統計学復習01
Daichi Ito
2022年度秋学期 統計学 第4回 データを「分布」で見る (2022. 10. 18)
2022年度秋学期 統計学 第4回 データを「分布」で見る (2022. 10. 18)
Akira Asano
有意性と効果量について しっかり考えてみよう
有意性と効果量について しっかり考えてみよう
Ken Urano
Lecture materials(20180820v1)
Lecture materials(20180820v1)
Kunihiro Hisatsune
Regression2
Regression2
Yuta Tomomatsu
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
More Related Content
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Data analysis-for-highschool-students
1.
高校生のためのデータ分析 情報科 山岸直生
2.
目次 • テーマ0 :
はじめに • テーマ1 : 点差はどれくらい? • テーマ2 :理科と数学の点数の関係 • テーマ3 :因果と相関 • テーマ4 : 直線を使って予想する • テーマ5 : サイコロは偏っている? • テーマ6 : 偏差値の計算
3.
コンビニのカード もっていますか?
4.
カードを使うと 割引されるのは なぜ?
5.
カードを使うと 割引されるのは なぜ? どういう人が、 どういうときにどんな商品を、 どんな商品と一緒に、 購入しているかがわかる
6.
カードを使うと 割引されるのは なぜ? ・在庫管理 ・棚の配置 ・割引企画 ・新商品開発 などに役立つ
7.
学校にもデータは たくさんある 生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91
8.
テスト結果 から何が わかるだろうか?
9.
テスト結果からわかること • どのくらいの難易度だったか • どのくらい点差がついたか •
だれがどのくらいできるか ⇒他にもいっぱいある
10.
テスト結果からわかること • どのくらいの難易度だったか ⇒平均 • どのくらい点差がついたか ⇒偏差 •
だれがどのくらいできるか ⇒合計
11.
学校にもデータは たくさんある 生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91
12.
自力でできるなら・・・ ⑥各生徒の平均点を出せ ⑦各科目の中央値(メジアン)を出せ ⑧各生徒の順位を出せ ⑨この試験問題において、 数学で90点とるのと理科で90点とるのとでは、 どちらがより「すごい」と考えられるか。
13.
テーマ1: 点差はどのくらい?
14.
どのくらいの差がついた? 国語 数学 49 0 51
0 48 100 52 100
15.
平均を引いてみよう 国語 数学 49(-1) 0(-50) 51(+1)
0(-50) 48(-2) 100(+50) 52(+2) 100(+50)
16.
( )の中の数値:偏差 国語 数学 49(-1)
0(-50) 51(+1) 0(-50) 48(-2) 100(+50) 52(+2) 100(+50)
17.
どのくらいの差? 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
18.
平均を計算する?? 国語 -1 +1 -2 +2
19.
点差はどのくらい? 数学 -50 -50 +50 +50
20.
偏差の平均は0 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
21.
差を計算するには? 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
22.
偏差の「絶対値」を使えばいい? 国語 数学 -1(1) -50(50) +1(1)
-50(50) -2(2) +50(50) +2(2) +50(50)
23.
偏差の絶対値 国語 数学 1 50 1
50 2 50 2 50
24.
偏差の絶対値の平均 国語 1 1 2 2
25.
偏差の絶対値の平均 数学 50 50 50 50
26.
偏差の絶対値の平均 国語:1.5 数学:50 なので数学の方が 48.5点分 点差がつきやすい 国語 数学 49 0 51
0 48 100 52 100
27.
偏差の絶対値の平均=平均偏差 国語 数学 49 0 51
0 48 100 52 100 平均偏差 1.5 50
28.
どのくらい 点差がつきやすいか を調べるには 平均偏差(Average Deviation) を計算すればいい
29.
Excelで計算
30.
似てるけど少し違う用語
31.
平均偏差より標準偏差 の方がよく使う? • 平均偏差(Average Deviation) ⇒偏差の絶対値の平均 •
標準偏差(Standard Deviation) ⇒偏差の二乗の平均のルート
32.
標準偏差の計算をしてみよう
33.
国語 数学 49 0 51
0 48 100 52 100
34.
偏差 国語 数学 -1 -50 +1
-50 -2 50 +2 50
35.
二乗 国語 数学 1 2500 1
2500 4 2500 4 2500
36.
平均 国語 数学 1 2500 1
2500 4 2500 4 2500 平均 2.5 2500
37.
ルート 国語 数学 1 2500 1
2500 4 2500 4 2500 平均 2.5 2500 ルート 1.58 50
38.
計算結果 国語 数学 49 0 51
0 48 100 52 100 平均偏差 1.5 50 標準偏差 1.58 50
39.
Excelで計算
40.
Rで計算
41.
まとめ • データを見たらまず ・平均(average) ・標準偏差(standard deviation) をチェックしよう
42.
課題 • 偏差値について調べてみよう。 • 五数要約について調べてみよう。
43.
練習:標準偏差を求めてみよう 生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91
44.
テーマ2: 数学の点が高い人は 理科の点も高い? 生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91
45.
数学と理科の関係をどう示す? 生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91
46.
数学ー理科の散布図を描く 30 40 50 60 70 80 90 100 30 40 50
60 70 80 90 100 理科 数学
47.
右に行くほど 上にデータがある感じがする? 30 40 50 60 70 80 90 100 30 40 50
60 70 80 90 100 理科 数学
48.
右に行くほど上にデータがある ⇒正の相関がある という 30 40 50 60 70 80 90 100 30 40
50 60 70 80 90 100 理科 数学
49.
正の相関がある散布図の例
50.
負の相関がある散布図の例
51.
散布図を描けば 2つの科目間の 関係がわかる
52.
Excelで散布図を描く
53.
「相関」は計算できる?
54.
相関は計算できる?
55.
相関は計算できる?
56.
相関係数 • R • correlation
coefficient • 右に行くほど 上に行けば大きくなる
57.
相関係数R ⇒Rが大きいほど、正の相関が大きい ⇒Rが小さいほど、負の相関が大きい
58.
相関係数 • −1 ≤
𝑅 ≤ 1の範囲の値をとる • R=1: 右上がりの直線 • R=-1 : 右下がりの直線 • R > 0 : 正の相関がある • R < 0 :負の相関がある
59.
𝑅 = −0.76
60.
𝑅 = −0.05
61.
R=0.24
62.
相関係数からわかること • 数学と理科の相関係数はR=0.91 ⇒強い正の相関がある ⇒数学ができる人は 理科もできる可能性が高い
63.
まとめ 二変数データをみたら、 散布図を描こう
64.
Rによる散布図行列
65.
散布図行列を作成してみよう 国語<-c(85,70,40,60,90,45,86) 英語<-c(80,75,40,60,100,20,94) 数学<-c(65,90,30,100,60,45,86) 理科<-c(70,85,60,85,65,55,91) test<-c(国語,英語,数学,理科) テスト<-matrix(t(test),nrow=7,ncol=4) colnames(テスト)<-c("国語","英語","数学","理科") pairs(test,cex=3)
66.
さらに工夫すると・・・
67.
まとめ 多変数データをみたら、 散布図行列を描こう
68.
練習: 他の科目間の相関係数を 求めてみましょう
69.
テーマ3: 因果と相関 次の散布図からいえることは?
70.
R = 0.905
71.
散布図からいえること • 気温が高いほど、売上が多い? • 売上が多いほど、気温が高い? •
気温が上がることによって、売上が変わる? • 売上が上がることによって、気温が上がる?
72.
散布図からいえること? ○気温が高いほど、売上が多い ○売上が多いほど、気温が高い ○気温が上がることによって、売上が上がる ×売上が上がることによって、気温が上がる
73.
散布図からいえること? ○気温が上がる ⇒ 売上が変わる ×売上が上がる
⇒ 気温が上がる
74.
散布図からいえること? 原因:気温が上がる 結果: 売上が変わる
75.
散布図からいえること? 原因:気温が上がる 結果: 売上が変わる 直接関係
76.
R = 0.81
77.
散布図からいえること? 気温が上がる 水難事故が増える
78.
散布図からいえること? 気温が上がる 海水浴客が増える 水難事故が増える
79.
散布図からいえること? 気温が上がる 海水浴客が増える 水難事故が増える 間 接 関 係
80.
R = 0.85
81.
R = 0.98
82.
Rの計算結果 気温が上がる 海水浴客が増える 水難事故が増える 間 接 関 係 R = 0.81 R
= 0.98 R = 0.85
83.
R = 0.86
84.
• 原因:水難事故件数 • 結果:アイスの売り上げ個数
85.
• 原因:水難事故件数 • 結果:アイスの売り上げ個数 ではないよね?
86.
気温 アイス 水難事故
87.
気温 アイス 水難事故
88.
気温 アイス 水難事故 共通原因による 疑似相関
89.
相関があっても、 原因結果関係があるとは 限らない!
90.
課題 • 疑似相関について 調べてみよう
91.
参考
92.
テーマ4: 直線を使って予想する 理科が80点の人の数学の点数は?
93.
生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91 理科が80点の人の 数学の点数は?
94.
生徒番号 国語 英語
数学 理科 1 85 80 65 70 2 70 75 90 85 3 40 40 30 60 4 60 60 100 85 5 90 100 60 65 6 45 20 45 55 7 86 94 86 91 散布図を描いて予想してみよう
95.
R = 0.91
96.
97.
回帰直線
98.
理科が80点の生徒は 数学も80点くらいだと予想される
99.
数学=理科×1.7-50
100.
課題 • Excelまたは統計処理ソフトRで、 同じようなことをやってみよう。 • 英語が50点の人の国語の点数は?
101.
テーマ5: サイコロの出た目は 偏ってるの? 乱数とヒストグラム
102.
0~1が同じ確率 で出る乱数をパソコンは 発生させることができる
103.
104.
105.
1~6が同じ確率 で出る乱数をパソコンは 発生させることができる
106.
107.
108.
このようにつくった サイコロの目は偏って いないだろうか?
109.
10万回サイコロ を振ってみよう 各目10万÷6=16667回 ずつ目が出るはず
110.
111.
0 5 10
15 20 25 1 2 3 4 5 6
112.
113.
まとめ かなり多くの回数さいころを振らないと 「本当に偏っているか」はわからない
114.
テーマ6: 実際に「偏差値」を 計算してみよう
115.
「偏差」を計算することで 平均が0のデータをつくれる
116.
「偏差」を計算することで 平均が0のデータをつくれる 標準偏差が同じデータを つくるには?
117.
復習 国語 数学 49 0 51
0 48 100 52 100
118.
偏差 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
119.
平均は0 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
120.
標準偏差は「ばらつき」度合い 国語 数学 49 0 51
0 48 100 52 100 標準偏差 1.58 50
121.
「ばらつき度合い」を 同じにするには?
122.
「ばらつき度合い」を 同じにするには? バラつき度合い:標準偏差 で割ればいい
123.
偏差に直す 国語 数学 -1 -50 +1
-50 -2 +50 +2 +50
124.
標準偏差で割った 国語 数学 -1(-0.63) -50(-1) +1(0.63)
-50(-1) -2(-1.26) +50(1) +2(1.26) +50(1) 標準偏差 1.58 50
125.
これをZ値という 国語 数学 -0.63 -1 0.63
-1 -1.26 1 1.26 1
126.
Z値 国語 数学 -0.63 -1 0.63
-1 -1.26 1 1.26 1 標準偏差 1.0 1.0 平均 0 0
127.
Z値の性質 • 平均0 • 標準偏差1 •
普通、-1~1の間に70% くらいのデータが含まれる
Editor's Notes
これを応用したのが偏差値である
以下のコードをRに打ち込んで作成した。 国語<-c(85,70,40,60,90,45,86) 英語<-c(80,75,40,60,100,20,94) 数学<-c(65,90,30,100,60,45,86) 理科<-c(70,85,60,85,65,55,91) test<-c(国語,英語,数学,理科) テスト<-matrix(t(test),nrow=7,ncol=4) colnames(テスト)<-c("国語","英語","数学","理科") pairs(test,cex=3)
library(psych) pairs.panels(テスト,cex=1.1)
<R言語にて下のコードを打ち込んで作成> 気温<-c(17.1,17.2,17.5,17.7,18,18.2,18.3,18.5,18.8,18.9,19,19.3,19.4,19.5,19.5,19.6,19.7,19.7,19.8,19.9,20.0,20,20,20,20.1,20.1,20.2 ,20.3,20.4,20.5,20.6,20.7,20.7,20.7,20.8,20.9,21,21.1,21.2,21.3,21.4,21.5,21.6,21.7,22,22.1,22.3,22.5,22.6,23,23.2,23.2,23.3,23.5, 24,24.1,24.3,25,25.1,25.3,25.4,25.5,25.6,26) 売上個数<- round((70+sqrt(気温)*5+気温*8+((気温-13)^2)/3.0+((気温-16)^3)/12.0+((気温-17)^4)/35.0+rnorm(length(気温))*15+5*(rnorm(length(気温))^2)+(rnorm(length(気温))^3)*4.0+(rnorm(length(気温))^4)*2.0+(rnorm(length(気温))^5))/2.5) plot(気温,売上個数,xlim=c(17,26),ylim=c(50,280),main="気温とアイスの売り上げ数",lwd=2,cex=2.5,cex.lab=2,cex.axis=1.5,cex.main=3)
風<-rnorm(length(気温)) 海水浴客<-round(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(floor(abs(abs(abs(abs(round(abs(floor(floor(floor(abs(abs(abs(abs(abs(abs((abs(abs(abs(round(((気温-17.1)*50+((気温-17.1)^2)*400+((気温-17.1)^3)*150+((気温-17.1)^4)*50+((気温-17.1)^5)*5+rnorm(length(気温))*100+(rnorm(length(気温))^2)-4)*50))-15)-10)*(5-風))-8)-6)-5)-4)-3)-2)/200.0)-1)/10))/2)-5)-4)-3)-2)/2.0)-20)-19)-18)-17)-16)-15)-14)-13)-12)-11)-10)-9)-8)-7)-6)-5)-4)-3)-2)-1)-1)+rnorm(気温)^6-3)-2)-1)/2.5) set.seed(2) 水難事故<- round((海水浴客*5+(rnorm(length(気温))^2)*100)/10000*(4-風)) plot(気温,水難事故,xlim=c(17,26),ylim=c(0,30),main="気温と水難事故件数",lwd=2,cex=2.5,cex.lab=2,cex.axis=1.5,cex.main=3)
普通は疑似相関の方がRが小さくなります
普通は疑似相関の方がRが小さくなります
http://pub.maruzen.co.jp/book_magazine/support/support.html
因果<-c(気温,売上個数,海水浴客,水難事故) 因果律<-matrix(t(因果),nrow=length(気温),ncol=4) colnames(因果律)<-c("気温","売上","海水浴","水事") pairs.panels(因果律)
数学<-c(65,90,30,100,60,45,86) 理科<-c(70,85,60,85,65,55,91) cor(数学,理科) plot(理科,数学,xlim=c(50,100),ylim=c(30,100),main="理科と数学の点数",lwd=2,cex=2.5,cex.lab=2,cex.axis=1.5,cex.main=3) lm.obj<-lm(数学~理科) abline(lm.obj,col=2) lm.obj
Download now