Econ 1150 Applied Econometrics Mini-Exam 1C/C++

Java Python Econ 1150

Applied Econometrics

Mini-Exam 1

1. The random variable Y is the number of new followers that Taylor Swift’s Instagram account on any given day. Assume that Y is continuous and follows a normal distribution N(10000, 4202 ). Find the following probabilities.

(a) P r(Y < 10357)

(b) Pr({9370 < Y < 9580} or {10420 < Y < 10840})

2. Information on new restaurants in Pittsburgh was collected. Specifically, the researcher checked whether the restaurants offered vegan items on the menu (V = 1) or not (V = 0 Econ 1150 Applied Econometrics Mini-Exam 1C/C++ ) and whether they stayed in business for at least a year (B = 1) or not (B = 0). The joint distribution of these variables are given by the following table:

(a) What is the proportion of restaurants that offer vegan items on their menu?

(b) Given that a restaurant stayed in business for at least a year, what is the probability that this restaurant offered vegan items on its menu?

(c) Are these variables (V and B) independent? (Hint: Use the marginal probabilities.)

3. X and Z are two random variables. We have P(Z = 1) = 0.7 and P(Z = 2) = 0.3. We also know E(X|Z = 1) = 9 and E(X|Z = 2) = 0. Calculate E(X)         

<think>好的,用户问如何提高SCP从192.168.86.150传输software-double.tar.gz到本地/home/econ/的速度。首先,我得回忆一下SCP的工作原理,它基于SSH协议,所以传输速度可能受加密算法、带宽限制等因素影响。 首先想到的是加密算法。SCP默认可能使用较安全的加密方式,比如AES-128,但这可能会影响速度。换成更快的算法,比如arcfour或chacha20,可能会提升速度。不过要注意这些算法的安全性较低,得确认传输环境是否允许。 接下来是压缩选项。虽然SCP有-C选项启用压缩,但如果文件已经是压缩过的(比如.tar.gz),再压缩可能效果不大,甚至增加CPU负担反而变慢。需要根据文件类型判断是否使用压缩。 然后是限速问题。检查本地或网络是否有带宽限制,比如路由器或防火墙设置。另外,SCP本身有没有限制速度的参数,比如-l参数,用户可能没设置或者设置过低,需要确认。 连接复用可能有用,比如使用SSH连接复用(ControlMaster),这样不需要每次重新建立连接,节省时间。但需要配置SSH客户端,可能对用户来说有点复杂。 传输协议方面,考虑换用更快的工具,比如rsync with -z压缩,或者使用非加密的如netcat,但安全性会下降。或者用tar结合ssh进行流式传输,可能绕过加密开销。 并行传输也是一个方法,将大文件分割成多个部分同时传输,但需要对方主机支持,操作步骤较多。 最后,检查网络状况本身,比如带宽是否被其他应用占用,或者物理连接是否稳定。使用iperf测试网络吞吐量,确定瓶颈在哪里。 综合这些因素,应该分步骤建议用户尝试,先调整加密算法和压缩,然后考虑连接复用和传输协议替换,最后评估网络状况。同时提醒用户注意安全性和环境限制,比如是否允许使用弱加密算法。</think>为了提高从192.168.86.150通过SCP传输文件的速度,可以按照以下步骤进行优化: ### 1. 调整加密算法(最快见效) 在SCP命令中通过`-c`参数指定更高效的加密算法: ```bash scp -c arcfour econ@192.168.86.150:/path/to/software-double.tar.gz /home/econ/ ``` *推荐算法*:`arcfour`(速度最快但安全性较低)或`chacha20-poly1305@openssh.com`(速度与安全性均衡)[^1] ### 2. 启用压缩传输(适用于可压缩文件) 对未压缩文件添加`-C`参数: ```bash scp -C econ@192.168.86.150:/path/to/software-double.tar.gz /home/econ/ ``` 注意:已压缩的.tar.gz文件使用此参数可能适得其反 ### 3. 提升带宽利用率 通过`-l`参数设置带宽限制(单位:Kbit/s),建议设置为物理带宽的90%: ```bash scp -l 800000 econ@192.168.86.150:/path/to/software-double.tar.gz /home/econ/ ``` ### 4. 多通道并行传输(需要安装pv工具) ```bash ssh econ@192.168.86.150 "cat /path/to/software-double.tar.gz" | pv | tar -xz -C /home/econ/ ``` ### 5. 网络层优化(需要root权限) ```bash sudo sysctl -w net.ipv4.tcp_sack=1 sudo sysctl -w net.ipv4.tcp_window_scaling=1 ``` ### 进阶方案:使用更高效传输协议 ```bash # 使用rsync并行传输 rsync -avz --progress econ@192.168.86.150:/path/to/software-double.tar.gz /home/econ/ # 使用bbcp(需双方安装) bbcp -w 2M -s 16 econ@192.168.86.150:/path/to/software-double.tar.gz /home/econ/ ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值